diff options
author | Jose <jose@zeroc.com> | 2018-10-29 18:30:50 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-10-29 18:30:50 +0100 |
commit | 5ce35f80fb561b58372fdf46ad52c2fd2949a630 (patch) | |
tree | 8da6db0bfc4a2a587e1266589a08259869856a9c /cpp/src/Ice/Instance.cpp | |
parent | Fix for PHP 5.3 (Amzn 2018.03) build failures (diff) | |
download | ice-5ce35f80fb561b58372fdf46ad52c2fd2949a630.tar.bz2 ice-5ce35f80fb561b58372fdf46ad52c2fd2949a630.tar.xz ice-5ce35f80fb561b58372fdf46ad52c2fd2949a630.zip |
Add support for systemd Type=notify to Ice::Service
Close #75
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 8 |
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()) |