summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Instance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r--cpp/src/Ice/Instance.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 45dad54ca6e..d1d1c7c9fda 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -58,6 +58,7 @@
#ifndef _WIN32
# include <Ice/SysLoggerI.h>
+# include <Ice/SystemdJournalI.h>
# include <signal.h>
# include <syslog.h>
@@ -1100,6 +1101,13 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi
_initData.properties->getProperty("Ice.ProgramName"),
_initData.properties->getPropertyWithDefault("Ice.SyslogFacility", "LOG_USER"));
}
+# ifdef ICE_USE_SYSTEMD
+ else if(_initData.properties->getPropertyAsInt("Ice.UseSystemdJournal") > 0)
+ {
+ _initData.logger = ICE_MAKE_SHARED(SystemdJournalI,
+ _initData.properties->getProperty("Ice.ProgramName"));
+ }
+# endif
else
#endif
if(!logfile.empty())