Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
logging::LoggingFilter Class Reference

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>

Inheritance diagram for logging::LoggingFilter:
Collaboration diagram for logging::LoggingFilter:

Public Member Functions

 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.
 

Private Attributes

quill::LogLevel m_eMinLogLevel
 

Detailed Description

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

Constructor & Destructor Documentation

◆ 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 // Set member variables.
159 m_eMinLogLevel = eMinLogLevel;
160 };

Member Function Documentation

◆ 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 // Not using these.
191 (void) qLogMetadata;
192 (void) unLogTimestamp;
193 (void) szThreadID;
194 (void) szThreadName;
195 (void) szLoggerName;
196 (void) szLogMessage;
197 (void) szLogStatement;
198
199 // Log only m_eMinLogLevel or higher to stdout.
200 return qLogLevel >= m_eMinLogLevel;
201 }

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