LogIt++
Loading...
Searching...
No Matches
ILogFormatter.hpp
Go to the documentation of this file.
1#pragma once
2#ifndef _LOGIT_ILOG_FORMATTER_HPP_INCLUDED
3#define _LOGIT_ILOG_FORMATTER_HPP_INCLUDED
4
7
8#include <string>
9#include <cstdint>
10
11namespace logit {
12
19 public:
20 virtual ~ILogFormatter() = default;
21
28 virtual void set_timestamp_offset(int64_t offset_ms) = 0;
29
37 virtual std::string format(const LogRecord& record) const = 0;
38 }; // ILogFormatter
39
40}; // namespace logit
41
42#endif // _LOGIT_ILOG_FORMATTER_HPP_INCLUDED
Interface for formatting log records.
virtual ~ILogFormatter()=default
virtual std::string format(const LogRecord &record) const =0
Formats a log record into a string.
virtual void set_timestamp_offset(int64_t offset_ms)=0
Sets the timestamp offset for log formatting.
The primary namespace for the LogIt++ library.
Stores log metadata and content.
Definition LogRecord.hpp:17