78 bool reset(std::string *errorMessage =
nullptr)
const;
87 bool consume(
const LogEntry &entry, std::string *errorMessage =
nullptr)
const;
90 std::string filePath_;
Small helper that targets one persisted runtime log file.
Definition log_file.h:56
const std::string & file_path() const
Return the configured runtime log-file path.
Definition log_file.cpp:92
bool consume(const LogEntry &entry, std::string *errorMessage=nullptr) const
Append one log entry to the configured runtime log file.
Definition log_file.cpp:100
RuntimeLogFileSink(std::string filePath=default_log_file_path())
Construct a runtime log-file sink for the requested file path.
Definition log_file.cpp:89
bool reset(std::string *errorMessage=nullptr) const
Truncate or recreate the configured runtime log file.
Definition log_file.cpp:96
@ logging
Logging and diagnostics options.
std::string default_log_file_path()
Return the default path used for persisted log output.
Definition log_file.cpp:30
bool append_log_file_entry(const LogEntry &entry, const std::string &filePath, std::string *errorMessage)
Append one formatted log entry to the persisted log file.
Definition log_file.cpp:57
LoadLogFileResult load_log_file(const std::string &filePath, std::size_t maxLines)
Load recent lines from the persisted log file.
Definition log_file.cpp:104
bool reset_log_file(const std::string &filePath, std::string *errorMessage)
Truncate or recreate the persisted log file.
Definition log_file.cpp:34
Declares logging configuration and output.
Result of loading the persisted log file for the shell viewer.
Definition log_file.h:20
bool fileFound
True when the target file existed on disk.
Definition log_file.h:23
std::string filePath
Path that was requested for loading.
Definition log_file.h:21
std::vector< std::string > lines
Loaded log lines in display order.
Definition log_file.h:22
std::string errorMessage
Error detail when loading failed.
Definition log_file.h:24
Structured log entry stored by the in-memory logger.
Definition logger.h:83