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
8
22
23namespace logit {
24
27 class ILogger {
28 public:
29 virtual ~ILogger() = default;
30
38 virtual void log(const LogRecord&, const std::string&) = 0;
39
44 virtual std::string get_string_param(const LoggerParam& param) const = 0;
45
50 virtual int64_t get_int_param(const LoggerParam& param) const = 0;
51
56 virtual double get_float_param(const LoggerParam& param) const = 0;
57
62 virtual void wait() = 0;
63 }; // ILogger
64
65}; // namespace logit
66
68
69#endif // _LOGIT_ILOGGER_HPP_INCLUDED
Contains the definition of the LogRecord structure for storing log data.
Interface for loggers that handle log message output.
Definition ILogger.hpp:27
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:15