9
9
#include " coherence/net/CacheFactory.hpp"
10
10
#include " coherence/util/Service.hpp"
11
11
12
+ #include " coherence/net/messaging/ConnectionException.hpp"
13
+
12
14
#include " private/coherence/component/net/extend/RemoteCacheService.hpp"
13
15
#include " private/coherence/component/net/extend/RemoteService.hpp"
14
16
#include " private/coherence/component/util/Service.hpp"
@@ -19,6 +21,7 @@ COH_OPEN_NAMESPACE3(coherence,component,util)
19
21
using coherence::component::net::extend::RemoteCacheService;
20
22
using coherence::component::net::extend ::RemoteService;
21
23
using coherence::net::CacheFactory;
24
+ using coherence::net::messaging::ConnectionException;
22
25
using coherence::security::auth::Subject;
23
26
using coherence::util::logging::Logger;
24
27
@@ -626,8 +629,17 @@ void SafeService::startService(ServiceType::Handle hService) const
626
629
}
627
630
catch (Exception::View e)
628
631
{
629
- COH_LOG (" Unable to start service "
630
- << getServiceName () << " : " << e, Logger::level_error);
632
+ String::View vsMessage = COH_TO_STRING (" Error while starting service " << getServiceName () << " : " );
633
+ if (instanceof<RemoteService::View>(hService) && instanceof<ConnectionException::View>(e))
634
+ {
635
+ // COH-30321 - skip printing the stack trace as connection failures are common and the stack trace
636
+ // doesn't provide anything useful
637
+ COH_LOG (vsMessage << " : " << e, Logger::level_error);
638
+ }
639
+ else
640
+ {
641
+ COH_LOG (vsMessage << " : " << e->getStackTrace (), Logger::level_error);
642
+ }
631
643
stopAfterFailedStart (hService);
632
644
COH_THROW (e);
633
645
}
0 commit comments