Log by line compilation option
Some checks failed
eden-build / source (pull_request) Has been skipped
eden-build / linux (pull_request) Successful in 22m34s
eden-build / android (pull_request) Successful in 16m28s
eden-license / license-header (pull_request_target) Failing after 16s
eden-build / windows (msvc) (pull_request) Successful in 1h0m18s
Some checks failed
eden-build / source (pull_request) Has been skipped
eden-build / linux (pull_request) Successful in 22m34s
eden-build / android (pull_request) Successful in 16m28s
eden-license / license-header (pull_request_target) Failing after 16s
eden-build / windows (msvc) (pull_request) Successful in 1h0m18s
Signed-off-by: swurl <swurl@swurl.xyz>
This commit is contained in:
parent
4596295b51
commit
b2b035dcca
3 changed files with 13 additions and 0 deletions
|
@ -49,6 +49,7 @@ cmake .. -G Ninja \
|
||||||
-DYUZU_USE_BUNDLED_VCPKG=OFF \
|
-DYUZU_USE_BUNDLED_VCPKG=OFF \
|
||||||
-DYUZU_USE_BUNDLED_QT=OFF \
|
-DYUZU_USE_BUNDLED_QT=OFF \
|
||||||
-DUSE_SYSTEM_QT=ON \
|
-DUSE_SYSTEM_QT=ON \
|
||||||
|
-DYUZU_LOG_BY_LINE=ON \
|
||||||
-DYUZU_USE_BUNDLED_FFMPEG=OFF \
|
-DYUZU_USE_BUNDLED_FFMPEG=OFF \
|
||||||
-DYUZU_USE_BUNDLED_SDL2=OFF \
|
-DYUZU_USE_BUNDLED_SDL2=OFF \
|
||||||
-DYUZU_USE_EXTERNAL_SDL2=ON \
|
-DYUZU_USE_EXTERNAL_SDL2=ON \
|
||||||
|
|
|
@ -73,6 +73,8 @@ option(YUZU_ENABLE_LTO "Enable link-time optimization" OFF)
|
||||||
|
|
||||||
option(YUZU_DOWNLOAD_TIME_ZONE_DATA "Always download time zone binaries" OFF)
|
option(YUZU_DOWNLOAD_TIME_ZONE_DATA "Always download time zone binaries" OFF)
|
||||||
|
|
||||||
|
option(YUZU_LOG_BY_LINE "Flush log data by the line rather than 4KB buffers" OFF)
|
||||||
|
|
||||||
option(YUZU_ENABLE_PORTABLE "Allow yuzu to enable portable mode if a user folder is found in the CWD" ON)
|
option(YUZU_ENABLE_PORTABLE "Allow yuzu to enable portable mode if a user folder is found in the CWD" ON)
|
||||||
|
|
||||||
CMAKE_DEPENDENT_OPTION(YUZU_USE_FASTER_LD "Check if a faster linker is available" ON "NOT WIN32" OFF)
|
CMAKE_DEPENDENT_OPTION(YUZU_USE_FASTER_LD "Check if a faster linker is available" ON "NOT WIN32" OFF)
|
||||||
|
@ -285,6 +287,11 @@ if (ARCHITECTURE_arm64 AND (ANDROID OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
|
||||||
add_definitions(-DHAS_NCE=1)
|
add_definitions(-DHAS_NCE=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (YUZU_LOG_BY_LINE)
|
||||||
|
add_definitions(-DYUZU_LOG_BY_LINE=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Configure C++ standard
|
# Configure C++ standard
|
||||||
# ===========================
|
# ===========================
|
||||||
|
|
||||||
|
|
|
@ -106,6 +106,11 @@ public:
|
||||||
|
|
||||||
bytes_written += file->WriteString(FormatLogMessage(entry).append(1, '\n'));
|
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
|
||||||
|
|
||||||
using namespace Common::Literals;
|
using namespace Common::Literals;
|
||||||
// Prevent logs from exceeding a set maximum size in the event that log entries are spammed.
|
// Prevent logs from exceeding a set maximum size in the event that log entries are spammed.
|
||||||
const auto write_limit = Settings::values.extended_logging.GetValue() ? 1_GiB : 100_MiB;
|
const auto write_limit = Settings::values.extended_logging.GetValue() ? 1_GiB : 100_MiB;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue