(file) Return to cimserver.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Server

Diff for /pegasus/src/Server/cimserver.cpp between version 1.35 and 1.36

version 1.35, 2001/12/13 14:54:56 version 1.36, 2001/12/20 21:33:04
Line 132 
Line 132 
  
 static const String NAMESPACE = "root/cimv2"; static const String NAMESPACE = "root/cimv2";
 static const String CLASSNAME_SHUTDOWNSERVICE = "PG_ShutdownService"; static const String CLASSNAME_SHUTDOWNSERVICE = "PG_ShutdownService";
 static const String PROPERTY_TIMEOUT = "timeout";  static const String PROPERTY_TIMEOUT = "operationTimeout";
  
 ConfigManager*    configManager; ConfigManager*    configManager;
  
Line 250 
Line 250 
     cout << usage << endl;     cout << usage << endl;
 } }
  
 void shutdownCIMOM(Boolean forceOption, String timeoutStr)  void shutdownCIMOM(Boolean forceOption, Uint32 timeoutValue)
 { {
     //     //
     // Create CIMClient object     // Create CIMClient object
Line 268 
Line 268 
     hostStr.append(":");     hostStr.append(":");
     hostStr.append(portNumberStr);     hostStr.append(portNumberStr);
  
       // Put server shutdown message to the logger
       Logger::put(Logger::STANDARD_LOG, "CIMServer", Logger::INFORMATION,
           "Shutdown $0 on port $1.", PEGASUS_NAME, portNumberStr);
   
     //     //
     // open connection to CIMOM     // open connection to CIMOM
     //     //
Line 277 
Line 281 
     }     }
     catch(Exception& e)     catch(Exception& e)
     {     {
           Logger::put(Logger::STANDARD_LOG, "CIMServer", Logger::INFORMATION,
               "Failed to connect to $0 $1.", PEGASUS_NAME, e.getMessage());
   
         PEGASUS_STD(cerr) << "Failed to connect to server: " << e.getMessage() << PEGASUS_STD(endl);         PEGASUS_STD(cerr) << "Failed to connect to server: " << e.getMessage() << PEGASUS_STD(endl);
         exit(1);         exit(1);
     }     }
Line 311 
Line 318 
         }         }
  
         inParams.append(CIMParamValue(         inParams.append(CIMParamValue(
             CIMParameter("timeout", CIMType::STRING),              CIMParameter("timeout", CIMType::UINT32),
             CIMValue(timeoutStr)));              CIMValue(timeoutValue)));
  
         CIMValue retValue = client.invokeMethod(         CIMValue retValue = client.invokeMethod(
             NAMESPACE,             NAMESPACE,
Line 320 
Line 327 
             "shutdown",             "shutdown",
             inParams,             inParams,
             outParams);             outParams);
   
           // Put server shutdown message to the logger
           Logger::put(Logger::STANDARD_LOG, "CIMServer", Logger::INFORMATION,
               "$0 terminated on port $1.", PEGASUS_NAME, portNumberStr);
   
     }     }
     catch(Exception& e)     catch(Exception& e)
     {     {
Line 565 
Line 577 
         }         }
  
         //         //
           // Check the log trace options and set global variable
           //
   
           if (String::equal(configManager->getCurrentValue("logtrace"), "true"))
           {
               Handler::setMessageLogTrace(true);
               pegasusIOLog = true;
           }
   
           // Get the log file directory definition.
           // We put String into Cstring because
           // Directory functions only handle Cstring.
           // ATTN-KS: create String based directory functions.
   
           logsDirectory = configManager->getCurrentValue("logdir");
   
           // Set up the Logger. This does not open the logs
           // Might be more logical to clean before set.
           // ATTN: Need tool to completely disable logging.
   
           Logger::setHomeDirectory(logsDirectory);
   
           //
         // Check to see if we need to shutdown CIMOM         // Check to see if we need to shutdown CIMOM
         //         //
         if (shutdownOption)         if (shutdownOption)
Line 585 
Line 620 
                 }                 }
             }             }
  
             shutdownCIMOM(forceOption, timeoutStr);              shutdownCIMOM(forceOption, timeoutValue);
             cout << "Pegasus CIM Server terminated." << endl;             cout << "Pegasus CIM Server terminated." << endl;
             exit(0);             exit(0);
         }         }
Line 606 
Line 641 
             pegasusIOTrace = true;             pegasusIOTrace = true;
             cout << "Trace Set" << endl;             cout << "Trace Set" << endl;
         }         }
         //  
         // Check the log trace options and set global variable  
         //  
   
         if (String::equal(configManager->getCurrentValue("logtrace"), "true"))  
         {  
             Handler::setMessageLogTrace(true);  
             pegasusIOLog = true;  
         }  
   
         // Get the log file directory definition.  
         // We put String into Cstring because  
         // Directory functions only handle Cstring.  
         // ATTN-KS: create String based directory functions.  
   
         logsDirectory = configManager->getCurrentValue("logdir");  
   
         // Set up the Logger. This does not open the logs  
         // Might be more logical to clean before set.  
         // ATTN: Need tool to completely disable logging.  
  
         Logger::setHomeDirectory(logsDirectory);          // Leave this in until people get familiar with the logs.
           cout << "Logs Directory = " << logsDirectory << endl;
  
         if (String::equal(configManager->getCurrentValue("cleanlogs"), "true"))         if (String::equal(configManager->getCurrentValue("cleanlogs"), "true"))
         {         {
             Logger::clean(logsDirectory);;             Logger::clean(logsDirectory);;
         }         }
  
         // Leave this in until people get familiar with the logs.  
         cout << "Logs Directory = " << logsDirectory << endl;  
   
         if (String::equal(configManager->getCurrentValue("slp"), "true"))         if (String::equal(configManager->getCurrentValue("slp"), "true"))
         {         {
             useSLP =  true;             useSLP =  true;


Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2