diff options
-rw-r--r-- | src/libutil/logging.hh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libutil/logging.hh b/src/libutil/logging.hh index ff17056f4..82ba54051 100644 --- a/src/libutil/logging.hh +++ b/src/libutil/logging.hh @@ -191,8 +191,9 @@ extern Verbosity verbosity; /* suppress msgs > this */ arguments are evaluated lazily. */ #define printMsg(level, args...) \ do { \ - if (level <= nix::verbosity) { \ - logger->log(level, fmt(args)); \ + auto __lvl = level; \ + if (__lvl <= nix::verbosity) { \ + logger->log(__lvl, fmt(args)); \ } \ } while (0) |