LogIt++
Loading...
Searching...
No Matches
ILogger.hpp
Go to the documentation of this file.
1#pragma once
2#ifndef _LOGIT_ILOGGER_HPP_INCLUDED
3#define _LOGIT_ILOGGER_HPP_INCLUDED
4
7
10
11namespace logit {
12
15 class ILogger {
16 public:
17 virtual ~ILogger() = default;
18
26 virtual void log(const LogRecord& record, const std::string& message) = 0;
27
32 virtual std::string get_string_param(const LoggerParam& param) const = 0;
33
38 virtual int64_t get_int_param(const LoggerParam& param) const = 0;
39
44 virtual double get_float_param(const LoggerParam& param) const = 0;
45
48 virtual void set_log_level(LogLevel level) = 0;
49
52 virtual LogLevel get_log_level() const = 0;
53
58 virtual void wait() = 0;
59 }; // ILogger
60
61}; // namespace logit
62
64
65#endif // _LOGIT_ILOGGER_HPP_INCLUDED
Interface for loggers that handle log message output.
Definition ILogger.hpp:15
virtual double get_float_param(const LoggerParam &param) const =0
Retrieves a floating-point parameter from the logger.
virtual void set_log_level(LogLevel level)=0
Sets the minimal log level for this logger.
virtual int64_t get_int_param(const LoggerParam &param) const =0
Retrieves an integer parameter from the logger.
virtual void log(const LogRecord &record, const std::string &message)=0
Logs a message.
virtual std::string get_string_param(const LoggerParam &param) const =0
Retrieves a string parameter from the logger.
virtual void wait()=0
Waits for all asynchronous logging operations to complete.
virtual ~ILogger()=default
virtual LogLevel get_log_level() const =0
Gets the minimal log level for this logger.
The primary namespace for the LogIt++ library.
LogLevel
Logging levels.
Definition enums.hpp:15
LoggerParam
Enumeration for different logger parameters that can be retrieved.
Definition enums.hpp:47
Stores log metadata and content.
Definition LogRecord.hpp:17