Loading...
Searching...
No Matches
libcamera::LogCategory Class Reference

A category of log message. More...

## Public Member Functions

const std::string & | name () const
| Retrieve the log category name.
LogSeverity | severity () const
| Retrieve the severity of the log category.
void | setSeverity (LogSeverity severity)
| Set the severity of the log category.

## Static Public Member Functions

static LogCategory * | create (std::string_view name)
| Create a new LogCategory or return an existing one.
static const LogCategory & | defaultCategory ()
| Retrieve the default log category.

## Friends

class | Logger

## Detailed Description

A category of log message.

The LogCategory class represents a category of log messages, related to an area of the library. It groups all messages belonging to the same category, and is used to control the log level per group.

## Member Function Documentation

## create()

LogCategory * libcamera::LogCategory::create | ( | std::string_view | name | ) |

static

Create a new LogCategory or return an existing one.

Parameters

  [in] | name | Name of the log category

Create and return a new LogCategory with the given name if such a category does not yet exist, or return the existing one.

Returns
  The pointer to the LogCategory

## defaultCategory()

const LogCategory & libcamera::LogCategory::defaultCategory | ( |  | ) |

static

Retrieve the default log category.

The default log category is named "default" and is used by the LOG() macro when no log category is specified.

Returns
  A reference to the default log category

## name()

const std::string & libcamera::LogCategory::name | ( |  | ) | const

inline

Retrieve the log category name.

Returns
  The log category name

## setSeverity()

void libcamera::LogCategory::setSeverity | ( | LogSeverity | severity | ) |

inline

Set the severity of the log category.

Messages of severity higher than or equal to the severity of the log category are printed, other messages are discarded.

## severity()

LogSeverity libcamera::LogCategory::severity | ( |  | ) | const

inline

Retrieve the severity of the log category.

See also
  setSeverity()

Returns
  Return the severity of the log category

The documentation for this class was generated from the following files:

- include/libcamera/base/log.h
- src/libcamera/base/log.cpp