diff options
Diffstat (limited to 'src/logger/logger.cpp')
-rw-r--r-- | src/logger/logger.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/logger/logger.cpp b/src/logger/logger.cpp index 92a3d9b..4287794 100644 --- a/src/logger/logger.cpp +++ b/src/logger/logger.cpp @@ -7,6 +7,10 @@ Logger::Logger(const int log_level): null_buffer{}, null_stream{&null_buffer} { +#ifdef SYSTEMD_FOUND + if (::getenv("JOURNAL_STREAM") != nullptr && this->use_stdout()) + this->use_systemd = true; +#endif } Logger::Logger(const int log_level, const std::string& log_file): |