refactor(log): reduce compile time LOG_LEVEL granularity

This commit is contained in:
bfredl
2023-02-26 12:51:03 +01:00
parent 6cab36e5b7
commit 2ba224e152
14 changed files with 108 additions and 146 deletions

View File

@ -33,7 +33,6 @@
NIX_CFLAGS_COMPILE = " -ggdb -Og";
cmakeBuildType = "Debug";
cmakeFlags = oa.cmakeFlags ++ [ "-DMIN_LOG_LEVEL=0" ];
disallowedReferences = [ ];
});
@ -45,7 +44,6 @@
}).overrideAttrs (oa: {
cmakeFlags = oa.cmakeFlags ++ [
"-DLUACHECK_PRG=${luacheck}/bin/luacheck"
"-DMIN_LOG_LEVEL=0"
"-DENABLE_LTO=OFF"
] ++ final.lib.optionals final.stdenv.isLinux [
# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags

View File

@ -31,9 +31,10 @@
# often. You can disable it explicitly:
# CMAKE_EXTRA_FLAGS += -DENABLE_LTO=OFF
# Log levels: 0 (DEBUG), 1 (INFO), 2 (WARNING), 3 (ERROR)
# Default is 1 (INFO) unless CMAKE_BUILD_TYPE is Release or RelWithDebInfo.
# CMAKE_EXTRA_FLAGS += -DMIN_LOG_LEVEL=1
# Log levels: DEBUG, INFO, WARNING, ERROR
# For Debug builds all log levels are used
# For Release and RelWithDebInfo builds only WARNING and ERROR are used, unless:
# CMAKE_EXTRA_FLAGS += -DLOG_DEBUG
# By default, nvim uses bundled versions of its required third-party
# dependencies.