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/Service.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/Service.cpp')
-rw-r--r-- | cpp/src/Ice/Service.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp index 4fca9da3e36..f3271be7cb8 100644 --- a/cpp/src/Ice/Service.cpp +++ b/cpp/src/Ice/Service.cpp @@ -187,6 +187,12 @@ public: _logger->error(_prefix, message); } + virtual string + getPrefix() + { + return _prefix; + } + virtual Ice::LoggerPtr cloneWithPrefix(const string& prefix) { @@ -196,10 +202,10 @@ public: private: SMEventLoggerPtr _logger; - string _prefix; + const string _prefix; }; -class SMEventLoggerI : public Ice::Logger, public SMEventLogger +class SMEventLoggerI : public SMEventLogger { public: @@ -317,14 +323,14 @@ public: print(s); } - virtual void + void print(const string& message) { // // Don't need to use a wide string converter as the wide string is passed // to Windows API. // - wstring msg = IceUtil::stringToWstring(message, _stringConverter); + wstring msg = IceUtil::stringToWstring(message, _stringConverter); const wchar_t* messages[1]; messages[0] = msg.c_str(); // @@ -347,7 +353,7 @@ public: trace(prefix, s); } - virtual void + void trace(const string& category, const string& message) { string s; @@ -362,7 +368,7 @@ public: // Don't need to use a wide string converter as the wide string is passed // to Windows API. // - wstring msg = IceUtil::stringToWstring(s, _stringConverter); + wstring msg = IceUtil::stringToWstring(s, _stringConverter); const wchar_t* messages[1]; messages[0] = msg.c_str(); // @@ -385,14 +391,14 @@ public: warning(s); } - virtual void + void warning(const string& message) { // // Don't need to use a wide string converter as the wide string is passed // to Windows API. // - wstring msg = IceUtil::stringToWstring(message, _stringConverter); + wstring msg = IceUtil::stringToWstring(message, _stringConverter); const wchar_t* messages[1]; messages[0] = msg.c_str(); // @@ -415,14 +421,14 @@ public: error(s); } - virtual void + void error(const string& message) { // // Don't need to use a wide string converter as the wide string is passed // to Windows API. // - wstring msg = IceUtil::stringToWstring(message, _stringConverter); + wstring msg = IceUtil::stringToWstring(message, _stringConverter); const wchar_t* messages[1]; messages[0] = msg.c_str(); // @@ -432,12 +438,6 @@ public: ReportEventW(_source, EVENTLOG_ERROR_TYPE, 0, EVENT_LOGGER_MSG, 0, 1, 0, messages, 0); } - virtual Ice::LoggerPtr - cloneWithPrefix(const string& prefix) - { - return new SMEventLoggerIWrapper(this, prefix); - } - static void setModuleHandle(HMODULE module) { |