aboutsummaryrefslogtreecommitdiff
path: root/src/common/logging/backend.cpp
diff options
context:
space:
mode:
authorswurl <swurl@swurl.xyz>2025-05-08 06:20:20 +0000
committercrueter <crueter@noreply.localhost>2025-05-08 06:20:20 +0000
commitd659d6f5b4a03f27d0cde7e1fd2f9da60095b5d0 (patch)
treeab108b629932c3c04526bc5c8ff6b5d0edc55310 /src/common/logging/backend.cpp
parentc2c7b2ad8a5f5c54b45cdb815e2f5ebe6975380a (diff)
Runtime option for flushing logs by line (#90)
Signed-off-by: swurl <swurl@swurl.xyz> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/90 Co-authored-by: swurl <swurl@swurl.xyz> Co-committed-by: swurl <swurl@swurl.xyz>
Diffstat (limited to 'src/common/logging/backend.cpp')
-rw-r--r--src/common/logging/backend.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index 5ce1c2582e..3b400c6566 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -88,8 +88,8 @@ public:
auto old_filename = filename;
old_filename += ".old.txt";
- // Existence checks are done within the functions themselves.
- // We don't particularly care if these succeed or not.
+ // Existence checks are done within the functions themselves.
+ // We don't particularly care if these succeed or not.
static_cast<void>(FS::RemoveFile(old_filename));
static_cast<void>(FS::RenameFile(filename, old_filename));
@@ -106,10 +106,10 @@ public:
bytes_written += file->WriteString(FormatLogMessage(entry).append(1, '\n'));
- // Option to log each line rather than 4k buffers
-#ifdef YUZU_LOG_BY_LINE
- file->Flush();
-#endif
+ // Option to log each line rather than 4k buffers
+ if (Settings::values.log_flush_lines.GetValue()) {
+ file->Flush();
+ }
using namespace Common::Literals;
// Prevent logs from exceeding a set maximum size in the event that log entries are spammed.