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
9namespace logit {
10
13 class ILogger {
14 public:
15 virtual ~ILogger() = default;
16
24 virtual void log(const LogRecord&, const std::string&) = 0;
25
30 virtual std::string get_string_param(const LoggerParam& param) const = 0;
31
36 virtual int64_t get_int_param(const LoggerParam& param) const = 0;
37
42 virtual double get_float_param(const LoggerParam& param) const = 0;
43
48 virtual void wait() = 0;
49 }; // ILogger
50
51}; // namespace logit
52
53#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:13
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