summaryrefslogtreecommitdiff
path: root/DAnCE/tools/System_Health/Daemon
diff options
context:
space:
mode:
authorjedmondson <jedmondson@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-03-21 11:25:22 +0000
committerjedmondson <jedmondson@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-03-21 11:25:22 +0000
commitf760dce745948f65d00a557cd1cbc03a9d35200f (patch)
treec7fdba113c1390162746bcea1b3e96214cce86ed /DAnCE/tools/System_Health/Daemon
parent7428bc08de6e8084b370466fed3ead19adf77d90 (diff)
downloadATCD-f760dce745948f65d00a557cd1cbc03a9d35200f.tar.gz
Mon Mar 21 11:07:19 UTC 2011 James Edmondson <james.r.edmondson@vanderbilt.edu>
- Applied formatting for 80 columns where possible - Added DANCE_TRACE to all functions so we have the option to turn them off and on. - Applied macros from dance\Logger\Log_Macros.h to replace numbers with appropriate log levels * tools/Artifact_Installation/Artifact_Installation_exec.cpp * tools/Artifact_Installation/Artifact_Installation_Impl.cpp * tools/Artifact_Installation/Installation_Repository_Manager.cpp * tools/Config_Handlers/ADD_Handler.cpp * tools/Config_Handlers/Any_Handler.cpp * tools/Config_Handlers/CPD_Handler.cpp * tools/Config_Handlers/DataType_Handler.cpp * tools/Config_Handlers/DnC_Dump.cpp * tools/Config_Handlers/DnC_Dump_T.cpp * tools/Config_Handlers/DP_Handler.cpp * tools/Config_Handlers/Dump_Obj.cpp * tools/Config_Handlers/DynAny_Handler/DataType_Handler.cpp * tools/Config_Handlers/DynAny_Handler/DynAlias_Handler.cpp * tools/Config_Handlers/DynAny_Handler/DynAny_Handler.cpp * tools/Config_Handlers/DynAny_Handler/DynEnum_Handler.cpp * tools/Config_Handlers/DynAny_Handler/DynSequence_Handler.cpp * tools/Config_Handlers/DynAny_Handler/DynStruct_Handler.cpp * tools/Config_Handlers/IDD_Handler.cpp * tools/Config_Handlers/MDD_Handler.cpp * tools/Config_Handlers/Package_Handlers/CAD_Handler.cpp * tools/Config_Handlers/Package_Handlers/CID_Handler.cpp * tools/Config_Handlers/Package_Handlers/CPD_Handler.cpp * tools/Config_Handlers/Package_Handlers/SID_Handler.cpp * tools/Config_Handlers/PSPE_Handler.cpp * tools/Config_Handlers/SatisfierProperty_Handler.cpp * tools/Config_Handlers/XML_File_Intf.cpp * tools/Convert_Plan/Convert_Plan.cpp * tools/Convert_Plan/Convert_Plan_Impl.cpp * tools/Split_Plan/Locality_Splitter.cpp * tools/Split_Plan/Split_Plan.cpp * tools/Split_Plan/Split_Plan_exec.cpp * tools/System_Health/Daemon/SHS_Daemon.cpp * tools/System_Health/Daemon/SHS_Daemon_Impl.cpp * tools/System_Health/Interceptors/SHS_CORBA_Transport.cpp
Diffstat (limited to 'DAnCE/tools/System_Health/Daemon')
-rw-r--r--DAnCE/tools/System_Health/Daemon/SHS_Daemon.cpp31
-rw-r--r--DAnCE/tools/System_Health/Daemon/SHS_Daemon_Impl.cpp8
2 files changed, 26 insertions, 13 deletions
diff --git a/DAnCE/tools/System_Health/Daemon/SHS_Daemon.cpp b/DAnCE/tools/System_Health/Daemon/SHS_Daemon.cpp
index 4b7285d274b..be41df81fa3 100644
--- a/DAnCE/tools/System_Health/Daemon/SHS_Daemon.cpp
+++ b/DAnCE/tools/System_Health/Daemon/SHS_Daemon.cpp
@@ -28,23 +28,26 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
dlf->init (argc, argv);
}
- DANCE_DEBUG (6, (LM_TRACE, DLINFO
+ DANCE_DEBUG (DANCE_LOG_EVENT_TRACE, (LM_TRACE, DLINFO
ACE_TEXT("SHS_Deamon - initializing ORB\n")));
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
- DANCE_DEBUG (6, (LM_TRACE, DLINFO
- ACE_TEXT("SHS_Deamon - initializing module instance\n")));
+ DANCE_DEBUG (DANCE_LOG_EVENT_TRACE, (LM_TRACE, DLINFO
+ ACE_TEXT("SHS_Deamon - initializing module instance\n")));
TAO::Utils::ORB_Destroyer safe_orb (orb);
CORBA::Object_var tmp = orb->resolve_initial_references ("NameService");
- CosNaming::NamingContext_var domain_nc = CosNaming::NamingContext::_narrow (tmp);
+ CosNaming::NamingContext_var domain_nc =
+ CosNaming::NamingContext::_narrow (tmp);
if (CORBA::is_nil (domain_nc.in ()))
{
- ACE_ERROR ((LM_EMERGENCY, "SHS_Daemon - Unable to register with the CORBA Naming Service\n"));
+ ACE_ERROR ((LM_EMERGENCY,
+ "SHS_Daemon - Unable to register with the"\
+ " CORBA Naming Service\n"));
return -1;
}
@@ -60,11 +63,14 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
policies.length (2);
try
{
- DANCE_DEBUG (9, (LM_TRACE, DLINFO ACE_TEXT("SHS_Deamon - ")
- ACE_TEXT("before creating the \"SHS\" POA.\n")));
-
- policies[0] = poa->create_id_assignment_policy (PortableServer::USER_ID);
- policies[1] = poa->create_lifespan_policy (PortableServer::PERSISTENT);
+ DANCE_DEBUG (DANCE_LOG_TRACE, (LM_TRACE,
+ DLINFO ACE_TEXT("SHS_Deamon - ")
+ ACE_TEXT("before creating the \"SHS\" POA.\n")));
+
+ policies[0] = poa->create_id_assignment_policy (
+ PortableServer::USER_ID);
+ policies[1] = poa->create_lifespan_policy (
+ PortableServer::PERSISTENT);
persistent_poa = poa->create_POA ("SHS",
mgr.in(),
policies);
@@ -101,7 +107,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
mgr->activate ();
orb->run ();
- DANCE_DEBUG (6, (LM_TRACE, DLINFO
+ DANCE_DEBUG (DANCE_LOG_EVENT_TRACE, (LM_TRACE, DLINFO
ACE_TEXT("SHS_Daemon - destroying ORB\n")));
orb->destroy ();
@@ -113,7 +119,8 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
}
catch (...)
{
- DANCE_ERROR (1, (LM_ERROR, "SHS_Daemon - Error: Unknown exception.\n"));
+ DANCE_ERROR (DANCE_LOG_TERMINAL_ERROR,
+ (LM_ERROR, "SHS_Daemon - Error: Unknown exception.\n"));
retval = -1;
}
diff --git a/DAnCE/tools/System_Health/Daemon/SHS_Daemon_Impl.cpp b/DAnCE/tools/System_Health/Daemon/SHS_Daemon_Impl.cpp
index 8a72c64ad63..7104d696437 100644
--- a/DAnCE/tools/System_Health/Daemon/SHS_Daemon_Impl.cpp
+++ b/DAnCE/tools/System_Health/Daemon/SHS_Daemon_Impl.cpp
@@ -16,17 +16,21 @@ namespace DAnCE
SHS_Daemon_i::SHS_Daemon_i (CORBA::ORB_ptr orb)
: orb_ (CORBA::ORB::_duplicate (orb))
{
+ DANCE_TRACE ("SHS_Daemon_i::constructor");
}
// Implementation skeleton destructor
SHS_Daemon_i::~SHS_Daemon_i (void)
{
+ DANCE_TRACE ("SHS_Daemon_i::destructor");
}
void
SHS_Daemon_i::update (const ::DAnCE::SHS::Status_Update & update)
{
- DANCE_DEBUG (6, (LM_DEBUG, DLINFO
+ DANCE_TRACE ("SHS_Daemon_i::update");
+
+ DANCE_DEBUG (DANCE_LOG_EVENT_TRACE, (LM_DEBUG, DLINFO
ACE_TEXT ("SHS_Daemon_i::update - ")
ACE_TEXT ("Received status update from <%C>\n"),
update.id.in ()));
@@ -64,6 +68,8 @@ namespace DAnCE
void SHS_Daemon_i::shutdown (void)
{
+ DANCE_TRACE ("SHS_Daemon_i::shutdown");
+
this->orb_->shutdown ();
}