![]() |
LogIt++
Header-only, macro-first C++ logging library
|
Stub implementation on non-POSIX platforms. More...
#include <CrashPosixLogger.hpp>
Classes | |
| struct | Config |
Public Member Functions | |
| CrashPosixLogger ()=default | |
| CrashPosixLogger (const Config &) | |
| void | log (const LogRecord &record, const std::string &message) override |
| Logs a message. | |
| std::string | get_string_param (const LoggerParam ¶m) const override |
| Retrieves a string parameter from the logger. | |
| int64_t | get_int_param (const LoggerParam ¶m) const override |
| Retrieves an integer parameter from the logger. | |
| double | get_float_param (const LoggerParam ¶m) const override |
| Retrieves a floating-point parameter from the logger. | |
| void | set_log_level (LogLevel level) override |
| Sets the minimal log level for this logger. | |
| LogLevel | get_log_level () const override |
| Gets the minimal log level for this logger. | |
| void | wait () override |
| Waits for all asynchronous logging operations to complete. | |
Public Member Functions inherited from logit::ILogger | |
| virtual | ~ILogger ()=default |
| virtual std::vector< std::string > | get_buffered_strings () const |
| Returns buffered formatted messages in chronological order. | |
| virtual std::vector< BufferedLogEntry > | get_buffered_entries () const |
| Returns buffered structured entries in chronological order. | |
| virtual std::vector< LogFileInfo > | list_log_files () const |
| Lists persisted log files owned by this backend. | |
| virtual LogFileReadResult | read_log_file (const std::string &path) const |
| Reads one persisted log file owned by this backend. | |
| virtual std::vector< LogFileReadResult > | read_log_files (const std::vector< std::string > &paths) const |
| Reads several persisted log files owned by this backend. | |
| virtual LogClearResult | clear_logs (const LogClearOptions &options=LogClearOptions()) |
| Clears logger-owned buffered or persisted records when supported. | |
| virtual void | shutdown () |
| Stops logger-owned asynchronous resources after draining pending work. | |
Static Public Member Functions | |
| static void | install_signal_handler (int signo) |
Static Public Attributes | |
| static constexpr std::size_t | kMaxBufferSize = 0 |
| static constexpr std::size_t | kDefaultBufferSize = 0 |
Stub implementation on non-POSIX platforms.
Definition at line 296 of file CrashPosixLogger.hpp.
|
default |
|
inlineexplicit |
Definition at line 307 of file CrashPosixLogger.hpp.
|
inlineoverridevirtual |
Retrieves a floating-point parameter from the logger.
Derived classes should implement this to return specific floating-point-based parameters.
| param | The parameter type to retrieve. |
Implements logit::ILogger.
Definition at line 324 of file CrashPosixLogger.hpp.
|
inlineoverridevirtual |
Retrieves an integer parameter from the logger.
Derived classes should implement this to return specific integer-based parameters.
| param | The parameter type to retrieve. |
Implements logit::ILogger.
Definition at line 319 of file CrashPosixLogger.hpp.
|
inlineoverridevirtual |
Gets the minimal log level for this logger.
Implements logit::ILogger.
Definition at line 333 of file CrashPosixLogger.hpp.
|
inlineoverridevirtual |
Retrieves a string parameter from the logger.
Derived classes should implement this to return specific string-based parameters.
| param | The parameter type to retrieve. |
Implements logit::ILogger.
Definition at line 314 of file CrashPosixLogger.hpp.
|
inlinestatic |
Definition at line 339 of file CrashPosixLogger.hpp.
|
inlineoverridevirtual |
Logs a message.
This pure virtual function must be implemented by derived logger classes. It handles the logging of messages, which could be output to a console, file, or other destinations.
| record | The log record containing details about the log event. |
| message | The formatted log message. |
Implements logit::ILogger.
Definition at line 309 of file CrashPosixLogger.hpp.
|
inlineoverridevirtual |
Sets the minimal log level for this logger.
| level | Minimum log level. |
Implements logit::ILogger.
Definition at line 329 of file CrashPosixLogger.hpp.
|
inlineoverridevirtual |
Waits for all asynchronous logging operations to complete.
This pure virtual function must be implemented by derived logger classes. It ensures that any pending log messages are fully processed, especially when logging asynchronously.
Implements logit::ILogger.
Definition at line 337 of file CrashPosixLogger.hpp.
|
staticconstexpr |
Definition at line 299 of file CrashPosixLogger.hpp.
|
staticconstexpr |
Definition at line 298 of file CrashPosixLogger.hpp.