Small helper that targets one persisted runtime log file.
More...
#include <src/logging/log_file.h>
|
| bool | consume (const LogEntry &entry, std::string *errorMessage=nullptr) const |
| | Append one log entry to the configured runtime log file.
|
| |
| const std::string & | file_path () const |
| | Return the configured runtime log-file path.
|
| |
| bool | reset (std::string *errorMessage=nullptr) const |
| | Truncate or recreate the configured runtime log file.
|
| |
| | RuntimeLogFileSink (std::string filePath=default_log_file_path()) |
| | Construct a runtime log-file sink for the requested file path.
|
| |
Small helper that targets one persisted runtime log file.
◆ RuntimeLogFileSink()
Construct a runtime log-file sink for the requested file path.
- Parameters
-
| filePath | Target log file path. |
◆ consume()
| bool logging::RuntimeLogFileSink::consume |
( |
const LogEntry & | entry, |
|
|
std::string * | errorMessage = nullptr ) const |
Append one log entry to the configured runtime log file.
- Parameters
-
| entry | Structured log entry to write. |
| errorMessage | Optional output for file-append failures. |
- Returns
- true when the entry was written successfully.
◆ file_path()
| const std::string & logging::RuntimeLogFileSink::file_path |
( |
| ) |
const |
Return the configured runtime log-file path.
- Returns
- Target log file path.
◆ reset()
| bool logging::RuntimeLogFileSink::reset |
( |
std::string * | errorMessage = nullptr | ) |
const |
Truncate or recreate the configured runtime log file.
- Parameters
-
| errorMessage | Optional output for I/O failures. |
- Returns
- true when the file was reset successfully.
The documentation for this class was generated from the following files: