This class serves as a container class for handling log filtering of loggers. This must be used if you want each handler to have a different logging level since adding multiple handlers to the same logger will apply the loggers logging level to each handler.
More...
#include <AutonomyLogging.h>
|
| LoggingFilter (const std::string szFilterBaseType, const quill::LogLevel eMinLogLevel) |
| Construct a new Console Filter object.
|
|
QUILL_NODISCARD bool | filter (const quill::MacroMetadata *qLogMetadata, uint64_t unLogTimestamp, std::string_view szThreadID, std::string_view szThreadName, std::string_view szLoggerName, quill::LogLevel qLogLevel, std::string_view szLogMessage, std::string_view szLogStatement) noexcept override |
| This method should never be called by this codebase, it is called internally by the quill library. This is used to filter log messages based on the log level. The individual sinks use this method to determine if a log message should be logged if a logger (ie SharedLogger) has multiple sinks.
|
|
|
quill::LogLevel | m_eMinLogLevel |
|
This class serves as a container class for handling log filtering of loggers. This must be used if you want each handler to have a different logging level since adding multiple handlers to the same logger will apply the loggers logging level to each handler.
- Author
- clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
- Date
- 2024-03-16
◆ LoggingFilter()
logging::LoggingFilter::LoggingFilter |
( |
const std::string |
szFilterBaseType, |
|
|
const quill::LogLevel |
eMinLogLevel |
|
) |
| |
|
inline |
Construct a new Console Filter object.
- Parameters
-
eMinLogLevel | - The minimum acceptable log level for the console handler. All log levels above this will also be logged. |
- Author
- clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
- Date
- 2024-03-16
156 : quill::Filter(szFilterBaseType)
157 {
158
159 m_eMinLogLevel = eMinLogLevel;
160 };
◆ filter()
QUILL_NODISCARD bool logging::LoggingFilter::filter |
( |
const quill::MacroMetadata * |
qLogMetadata, |
|
|
uint64_t |
unLogTimestamp, |
|
|
std::string_view |
szThreadID, |
|
|
std::string_view |
szThreadName, |
|
|
std::string_view |
szLoggerName, |
|
|
quill::LogLevel |
qLogLevel, |
|
|
std::string_view |
szLogMessage, |
|
|
std::string_view |
szLogStatement |
|
) |
| |
|
inlineoverridenoexcept |
This method should never be called by this codebase, it is called internally by the quill library. This is used to filter log messages based on the log level. The individual sinks use this method to determine if a log message should be logged if a logger (ie SharedLogger) has multiple sinks.
- Parameters
-
qLogMetadata | - The metadata of the log statement. |
unLogTimestamp | - The timestamp of the log statement. |
szThreadID | - The ID of the thread that generated the log statement. |
szThreadName | - The name of the thread that generated the log statement. |
szLoggerName | - The name of the logger that generated the log statement. |
qLogLevel | - The log level of the log statement. |
szLogMessage | - The message of the log statement. |
szLogStatement | - The full log statement. |
- Returns
- * QUILL_NODISCARD - Whether or not the log message should be logged.
- Author
- clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
- Date
- 2025-02-07
189 {
190
191 (void) qLogMetadata;
192 (void) unLogTimestamp;
193 (void) szThreadID;
194 (void) szThreadName;
195 (void) szLoggerName;
196 (void) szLogMessage;
197 (void) szLogStatement;
198
199
200 return qLogLevel >= m_eMinLogLevel;
201 }
The documentation for this class was generated from the following file: