diff options
Diffstat (limited to 'src/log/log.cpp')
| -rw-r--r-- | src/log/log.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/log/log.cpp b/src/log/log.cpp index 7ed4ab2..f890ba2 100644 --- a/src/log/log.cpp +++ b/src/log/log.cpp @@ -321,5 +321,11 @@ void log_print(enum log_level level, const char *module, const char *fmt, ...) { nwrite = write(g_log_ctx->log_fd, buf, p - buf); } while (nwrite == -1 && errno == EINTR); + + // log level is LOG_STATE, also print to stderr + if (level == LOG_STATE) + { + fprintf(stderr, "%s", buf); + } } }
\ No newline at end of file |
