diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-03-04 17:18:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-04 17:18:32 +0100 |
commit | bc26f23e5ae49f54b4fbd18f692f300254e454eb (patch) | |
tree | c5bed8b8eb3aaf261197a9713eef8b8cc3e13e35 /src/nvim/log.c | |
parent | dde5ce46b2e3e77efc27394b946ef49ce565cd95 (diff) | |
parent | 2ba224e1526681c1a0b1b2b095b1ef2b0874db48 (diff) | |
download | rneovim-bc26f23e5ae49f54b4fbd18f692f300254e454eb.tar.gz rneovim-bc26f23e5ae49f54b4fbd18f692f300254e454eb.tar.bz2 rneovim-bc26f23e5ae49f54b4fbd18f692f300254e454eb.zip |
Merge pull request #22415 from bfredl/log_debug
refactor(log): reduce compile time LOG_LEVEL granularity
Diffstat (limited to 'src/nvim/log.c')
-rw-r--r-- | src/nvim/log.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/log.c b/src/nvim/log.c index 2c214aa32d..77eeb09fec 100644 --- a/src/nvim/log.c +++ b/src/nvim/log.c @@ -141,9 +141,13 @@ bool logmsg(int log_level, const char *context, const char *func_name, int line_ return false; } - if (log_level < MIN_LOG_LEVEL) { +#ifndef NVIM_LOG_DEBUG + // This should rarely happen (callsites are compiled out), but to be sure. + // TODO(bfredl): allow log levels to be configured at runtime + if (log_level < LOGLVL_WRN) { return false; } +#endif #ifdef EXITFREE // Logging after we've already started freeing all our memory will only cause |