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
6
20
21namespace logit {
22
25 class ILogger {
26 public:
27 virtual ~ILogger() = default;
28
36 virtual void log(const LogRecord&, const std::string&) = 0;
37
42 virtual std::string get_string_param(const LoggerParam& param) const = 0;
43
48 virtual int64_t get_int_param(const LoggerParam& param) const = 0;
49
54 virtual double get_float_param(const LoggerParam& param) const = 0;
55
60 virtual void wait() = 0;
61 }; // ILogger
62
63}; // namespace logit
64
66
67#endif // _LOGIT_ILOGGER_HPP_INCLUDED
Interface for loggers that handle log message output.
Definition ILogger.hpp:25
virtual double get_float_param(const LoggerParam &param) const =0
Retrieves a floating-point parameter from the logger. Derived classes should implement this to return...
virtual int64_t get_int_param(const LoggerParam &param) const =0
Retrieves an integer parameter from the logger. Derived classes should implement this to return speci...
virtual void log(const LogRecord &, const std::string &)=0
Logs a message.
virtual std::string get_string_param(const LoggerParam &param) const =0
Retrieves a string parameter from the logger. Derived classes should implement this to return specifi...
virtual void wait()=0
Waits for all asynchronous logging operations to complete.
virtual ~ILogger()=default
The primary namespace for the LogIt++ library.
LoggerParam
Enumeration for different logger parameters that can be retrieved.
Definition Enums.hpp:46
Stores log metadata and content.
Definition LogRecord.hpp:13