libcamera  v0.0.0
Supporting cameras in Linux since 2019
Public Member Functions | Static Public Member Functions | List of all members
libcamera::LogCategory Class Reference

A category of log message. More...

Public Member Functions

 LogCategory (const char *name)
 Construct a log category. More...
 
const char * name () const
 Retrieve the log category name. More...
 
LogSeverity severity () const
 Retrieve the severity of the log category. More...
 
void setSeverity (LogSeverity severity)
 Set the severity of the log category. More...
 

Static Public Member Functions

static const LogCategorydefaultCategory ()
 Retrieve the default log category. More...
 

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.

Constructor & Destructor Documentation

◆ LogCategory()

libcamera::LogCategory::LogCategory ( const char *  name)
explicit

Construct a log category.

Parameters
[in]nameThe category name

Member Function Documentation

◆ 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 pointer to the default log category

◆ name()

libcamera::LogCategory::name ( ) const
inline

Retrieve the log category name.

Returns
The log category name

◆ setSeverity()

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

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()

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: