diff options
author | Bernard Normier <bernard@zeroc.com> | 2014-08-14 16:38:21 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2014-08-14 16:38:21 -0400 |
commit | 18748d529095d3ab86e3dc42abfd2b5f4946f9a7 (patch) | |
tree | 1f343c0790d98e7fbcff50ad94ea5c1e272b2d4f /cpp/src/Ice/SysLoggerI.cpp | |
parent | Fixed ice_invocationTimout usage in IceDiscovery hello demos (diff) | |
download | ice-18748d529095d3ab86e3dc42abfd2b5f4946f9a7.tar.bz2 ice-18748d529095d3ab86e3dc42abfd2b5f4946f9a7.tar.xz ice-18748d529095d3ab86e3dc42abfd2b5f4946f9a7.zip |
Initial merge for ICE-2400:
- added new Logger admin facet (C++ only)
- this Logger facet allows remote application to retrieve the Ice log file, including recently logged events, with optional filters
- this logger facet also allows remote applications to attach RemoteLogger objects to get new logs as they are generated
- added new "show log" feature to icegridadmin, to retrieve Ice log file of Ice server (not yet implemented for IceGrid registry and node)
Diffstat (limited to 'cpp/src/Ice/SysLoggerI.cpp')
-rw-r--r-- | cpp/src/Ice/SysLoggerI.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cpp/src/Ice/SysLoggerI.cpp b/cpp/src/Ice/SysLoggerI.cpp index 65a35ddecc5..197e88ae375 100644 --- a/cpp/src/Ice/SysLoggerI.cpp +++ b/cpp/src/Ice/SysLoggerI.cpp @@ -15,7 +15,9 @@ using namespace std; using namespace Ice; using namespace IceInternal; -Ice::SysLoggerI::SysLoggerI(const string& prefix, const string& facilityString) +Ice::SysLoggerI::SysLoggerI(const string& prefix, const string& facilityString) : + _facility(0), + _prefix(prefix) { if(facilityString == "LOG_KERN") { @@ -111,7 +113,8 @@ Ice::SysLoggerI::SysLoggerI(const string& prefix, const string& facilityString) } Ice::SysLoggerI::SysLoggerI(const string& prefix, int facility) : - _facility(facility) + _facility(facility), + _prefix(prefix) { int logopt = LOG_PID | LOG_CONS; openlog(prefix.c_str(), logopt, facility); @@ -151,6 +154,12 @@ Ice::SysLoggerI::error(const string& message) syslog(LOG_ERR, "%s", message.c_str()); } +string +Ice::SysLoggerI::getPrefix() +{ + return _prefix; +} + Ice::LoggerPtr Ice::SysLoggerI::cloneWithPrefix(const string& prefix) { |