![]() |
Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
|
Implements log file lifecycle helpers. More...
#include "src/logging/log_file.h"#include <array>#include <cerrno>#include <cstdio>#include <cstring>#include <deque>#include <string>#include "src/platform/filesystem_utils.h"#include "src/startup/storage_paths.h"Functions | |
| bool | logging::append_log_file_entry (const LogEntry &entry, const std::string &filePath=default_log_file_path(), std::string *errorMessage=nullptr) |
| Append one formatted log entry to the persisted log file. | |
| std::string | logging::default_log_file_path () |
| Return the default path used for persisted log output. | |
| LoadLogFileResult | logging::load_log_file (const std::string &filePath=default_log_file_path(), std::size_t maxLines=64U) |
| Load recent lines from the persisted log file. | |
| bool | logging::reset_log_file (const std::string &filePath=default_log_file_path(), std::string *errorMessage=nullptr) |
| Truncate or recreate the persisted log file. | |
Implements log file lifecycle helpers.
| bool logging::append_log_file_entry | ( | const LogEntry & | entry, |
| const std::string & | filePath = default_log_file_path(), | ||
| std::string * | errorMessage = nullptr ) |
Append one formatted log entry to the persisted log file.
| entry | Structured log entry to append. |
| filePath | Target log file path. |
| errorMessage | Optional output for I/O failures. |
| std::string logging::default_log_file_path | ( | ) |
Return the default path used for persisted log output.
| LoadLogFileResult logging::load_log_file | ( | const std::string & | filePath = default_log_file_path(), |
| std::size_t | maxLines = 64U ) |
Load recent lines from the persisted log file.
| filePath | Target log file path. |
| maxLines | Maximum number of trailing lines to retain. |
| bool logging::reset_log_file | ( | const std::string & | filePath = default_log_file_path(), |
| std::string * | errorMessage = nullptr ) |
Truncate or recreate the persisted log file.
| filePath | Path to reset. |
| errorMessage | Optional output for I/O failures. |