summaryrefslogtreecommitdiff
path: root/cpp/src/IceBox/ServiceManagerI.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2012-10-22 12:56:41 -0400
committerBernard Normier <bernard@zeroc.com>2012-10-22 12:56:41 -0400
commitf1b727794617cc064d3aabee1e981cd4dcd07051 (patch)
treed4c18e607ad7059de11c06dd096dd28ee1f508f6 /cpp/src/IceBox/ServiceManagerI.cpp
parentMerge branch 'master' of ssh://git/home/git/ice (diff)
downloadice-f1b727794617cc064d3aabee1e981cd4dcd07051.tar.bz2
ice-f1b727794617cc064d3aabee1e981cd4dcd07051.tar.xz
ice-f1b727794617cc064d3aabee1e981cd4dcd07051.zip
Fixed ICE-4882:
Better logging in C++, especially with services. On compilers with stack-trace printing support, the stack trace of most exceptions is now logged.
Diffstat (limited to 'cpp/src/IceBox/ServiceManagerI.cpp')
-rw-r--r--cpp/src/IceBox/ServiceManagerI.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp
index 2e04b637793..f1ef006a716 100644
--- a/cpp/src/IceBox/ServiceManagerI.cpp
+++ b/cpp/src/IceBox/ServiceManagerI.cpp
@@ -25,6 +25,7 @@ using namespace std;
typedef IceBox::Service* (*SERVICE_FACTORY)(CommunicatorPtr);
+
namespace
{
@@ -623,7 +624,7 @@ IceBox::ServiceManagerI::start(const string& service, const string& entryPoint,
}
catch(const Exception& ex)
{
- ostringstream s;
+ LoggerOutputBase s;
s << "ServiceManager: exception while starting service " << service << ":\n";
s << ex;
@@ -672,7 +673,7 @@ IceBox::ServiceManagerI::start(const string& service, const string& entryPoint,
}
catch(const Exception& ex)
{
- ostringstream s;
+ LoggerOutputBase s;
s << "ServiceManager: exception in entry point `" + entryPoint + "' for service " << info.name << ":\n";
s << ex;
@@ -710,7 +711,7 @@ IceBox::ServiceManagerI::start(const string& service, const string& entryPoint,
}
catch(const Exception& ex)
{
- ostringstream s;
+ LoggerOutputBase s;
s << "ServiceManager: exception while starting service " << info.name << ":\n";
s << ex;