version 1.9, 2001/05/27 21:01:45
|
version 1.10, 2001/05/29 21:28:44
|
|
|
#include <Pegasus/Server/CIMServer.h> | #include <Pegasus/Server/CIMServer.h> |
#include <Pegasus/Common/PegasusVersion.h> | #include <Pegasus/Common/PegasusVersion.h> |
#include <Pegasus/Protocol/Handler.h> | #include <Pegasus/Protocol/Handler.h> |
|
#include <Pegasus/Common/logger.h> |
| |
PEGASUS_USING_PEGASUS; | PEGASUS_USING_PEGASUS; |
PEGASUS_USING_STD; | PEGASUS_USING_STD; |
|
|
{ | { |
{"port", "8888", false, Option::WHOLE_NUMBER, 0, 0, "port"}, | {"port", "8888", false, Option::WHOLE_NUMBER, 0, 0, "port"}, |
{"trace", "false", false, Option::BOOLEAN, 0, 0, "t"}, | {"trace", "false", false, Option::BOOLEAN, 0, 0, "t"}, |
|
{"Severity", "ALL", false, Option::STRING, 0, 0, "s"}, |
|
{"logs", "ALL", false, Option::STRING, 0, 0, "L"}, |
{"version", "false", false, Option::BOOLEAN, 0, 0, "v"}, | {"version", "false", false, Option::BOOLEAN, 0, 0, "v"}, |
{"help", "false", false, Option::BOOLEAN, 0, 0, "h"}, | {"help", "false", false, Option::BOOLEAN, 0, 0, "h"}, |
{"debug", "false", false, Option::BOOLEAN, 0, 0, "d"} | {"debug", "false", false, Option::BOOLEAN, 0, 0, "d"} |
|
|
String portOption; | String portOption; |
om.lookupValue("port", portOption); | om.lookupValue("port", portOption); |
| |
|
Logger::setHomeDirectory("./logs"); |
|
|
try | try |
{ | { |
Selector selector; | Selector selector; |
|
|
cout <<"Started..." | cout <<"Started..." |
<< (pegasusIOTrace ? " Tracing": " ") << endl; | << (pegasusIOTrace ? " Tracing": " ") << endl; |
| |
|
Logger::put(Logger::STANDARD_LOG, "CIMServer", Logger::INFORMATION, |
|
"Start $0 %1 port $2 $3 ", 88, PEGASUS_NAME, PEGASUS_VERSION, |
|
address, (pegasusIOTrace ? " Tracing": " ")); |
|
|
server.bind(address); | server.bind(address); |
delete [] address; | delete [] address; |
server.runForever(); | server.runForever(); |