LogIt++
Header-only, macro-first C++ logging library
Loading...
Searching...
No Matches
logit::EventLogLogger Class Reference

Stub logger when Windows Event Log is unavailable. More...

#include <EventLogLogger.hpp>

Inheritance diagram for logit::EventLogLogger:
logit::ILogger

Classes

struct  Config
 Stub configuration. More...
 

Public Member Functions

 EventLogLogger ()
 Construct stub logger.
 
 EventLogLogger (const Config &c)
 Construct with configuration.
 
 EventLogLogger (const wchar_t *source, bool async)
 Construct with parameters.
 
 EventLogLogger (const wchar_t *source, bool async, bool use_dedicated_executor, std::size_t queue_capacity, QueuePolicy queue_policy)
 Construct with parameters and ignored dedicated executor options.
 
void log (const LogRecord &rec, const std::string &msg) override
 Ignore log request.
 
std::string get_string_param (const LoggerParam &param) const override
 Return empty string parameter.
 
int64_t get_int_param (const LoggerParam &param) const override
 Return zero integer parameter.
 
double get_float_param (const LoggerParam &param) const override
 Return zero float parameter.
 
void set_log_level (LogLevel l) override
 Ignore level change.
 
LogLevel get_log_level () const override
 Return default log level.
 
void wait () override
 No-op wait.
 
- Public Member Functions inherited from logit::ILogger
virtual ~ILogger ()=default
 
virtual std::vector< std::string > get_buffered_strings () const
 Returns buffered formatted messages in chronological order.
 
virtual std::vector< BufferedLogEntry > get_buffered_entries () const
 Returns buffered structured entries in chronological order.
 
virtual std::vector< LogFileInfo > list_log_files () const
 Lists persisted log files owned by this backend.
 
virtual LogFileReadResult read_log_file (const std::string &path) const
 Reads one persisted log file owned by this backend.
 
virtual std::vector< LogFileReadResult > read_log_files (const std::vector< std::string > &paths) const
 Reads several persisted log files owned by this backend.
 
virtual LogClearResult clear_logs (const LogClearOptions &options=LogClearOptions())
 Clears logger-owned buffered or persisted records when supported.
 
virtual void shutdown ()
 Stops logger-owned asynchronous resources after draining pending work.
 

Detailed Description

Stub logger when Windows Event Log is unavailable.

Definition at line 179 of file EventLogLogger.hpp.

Constructor & Destructor Documentation

◆ EventLogLogger() [1/4]

logit::EventLogLogger::EventLogLogger ( )
inline

Construct stub logger.

Definition at line 192 of file EventLogLogger.hpp.

◆ EventLogLogger() [2/4]

logit::EventLogLogger::EventLogLogger ( const Config & c)
inlineexplicit

Construct with configuration.

Parameters
cIgnored configuration.

Definition at line 196 of file EventLogLogger.hpp.

◆ EventLogLogger() [3/4]

logit::EventLogLogger::EventLogLogger ( const wchar_t * source,
bool async )
inline

Construct with parameters.

Parameters
sourceIgnored source name.
asyncIgnored flag.

Definition at line 201 of file EventLogLogger.hpp.

◆ EventLogLogger() [4/4]

logit::EventLogLogger::EventLogLogger ( const wchar_t * source,
bool async,
bool use_dedicated_executor,
std::size_t queue_capacity,
QueuePolicy queue_policy )
inline

Construct with parameters and ignored dedicated executor options.

Definition at line 204 of file EventLogLogger.hpp.

Member Function Documentation

◆ get_float_param()

double logit::EventLogLogger::get_float_param ( const LoggerParam & param) const
inlineoverridevirtual

Return zero float parameter.

Parameters
paramParameter identifier.
Returns
Zero.

Implements logit::ILogger.

Definition at line 228 of file EventLogLogger.hpp.

◆ get_int_param()

int64_t logit::EventLogLogger::get_int_param ( const LoggerParam & param) const
inlineoverridevirtual

Return zero integer parameter.

Parameters
paramParameter identifier.
Returns
Zero.

Implements logit::ILogger.

Definition at line 223 of file EventLogLogger.hpp.

◆ get_log_level()

LogLevel logit::EventLogLogger::get_log_level ( ) const
inlineoverridevirtual

Return default log level.

Returns
LogLevel::LOG_LVL_TRACE.

Implements logit::ILogger.

Definition at line 236 of file EventLogLogger.hpp.

◆ get_string_param()

std::string logit::EventLogLogger::get_string_param ( const LoggerParam & param) const
inlineoverridevirtual

Return empty string parameter.

Parameters
paramParameter identifier.
Returns
Empty string.

Implements logit::ILogger.

Definition at line 218 of file EventLogLogger.hpp.

◆ log()

void logit::EventLogLogger::log ( const LogRecord & rec,
const std::string & msg )
inlineoverridevirtual

Ignore log request.

Parameters
recLog metadata.
msgMessage text.

Implements logit::ILogger.

Definition at line 213 of file EventLogLogger.hpp.

◆ set_log_level()

void logit::EventLogLogger::set_log_level ( LogLevel l)
inlineoverridevirtual

Ignore level change.

Parameters
lDesired level.

Implements logit::ILogger.

Definition at line 232 of file EventLogLogger.hpp.

◆ wait()

void logit::EventLogLogger::wait ( )
inlineoverridevirtual

No-op wait.

Implements logit::ILogger.

Definition at line 239 of file EventLogLogger.hpp.


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