Commit 412646b0 authored by Pavel Vainerman's avatar Pavel Vainerman

(admin): подправил логи..

(codegen): подправил вывод информации о LogServer-е
parent 1ac2fe0b
...@@ -60,6 +60,7 @@ string conffile("configure.xml"); ...@@ -60,6 +60,7 @@ string conffile("configure.xml");
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
static bool commandToAll( const string& section, std::shared_ptr<ObjectRepository>& rep, Command cmd ); static bool commandToAll( const string& section, std::shared_ptr<ObjectRepository>& rep, Command cmd );
static void createSections(const std::shared_ptr<Configuration>& c ); static void createSections(const std::shared_ptr<Configuration>& c );
static void errDoNotReolve( const std::string& oname );
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
int omap(); int omap();
int configure( const string& args, UInterface& ui ); int configure( const string& args, UInterface& ui );
...@@ -418,7 +419,11 @@ static bool commandToAll(const string& section, std::shared_ptr<ObjectRepository ...@@ -418,7 +419,11 @@ static bool commandToAll(const string& section, std::shared_ptr<ObjectRepository
{ {
case StartUp: case StartUp:
{ {
if(CORBA::is_nil(obj)) break; if( CORBA::is_nil(obj) )
{
errDoNotReolve(ob);
break;
}
SystemMessage msg(SystemMessage::StartUp); SystemMessage msg(SystemMessage::StartUp);
obj->push( Message::transport(msg) ); obj->push( Message::transport(msg) );
...@@ -430,7 +435,11 @@ static bool commandToAll(const string& section, std::shared_ptr<ObjectRepository ...@@ -430,7 +435,11 @@ static bool commandToAll(const string& section, std::shared_ptr<ObjectRepository
case FoldUp: case FoldUp:
{ {
if(CORBA::is_nil(obj)) break; if(CORBA::is_nil(obj))
{
errDoNotReolve(ob);
break;
}
SystemMessage msg(SystemMessage::FoldUp); SystemMessage msg(SystemMessage::FoldUp);
obj->push( Message::transport(msg) ); obj->push( Message::transport(msg) );
...@@ -442,7 +451,11 @@ static bool commandToAll(const string& section, std::shared_ptr<ObjectRepository ...@@ -442,7 +451,11 @@ static bool commandToAll(const string& section, std::shared_ptr<ObjectRepository
case Finish: case Finish:
{ {
if(CORBA::is_nil(obj)) break; if(CORBA::is_nil(obj))
{
errDoNotReolve(ob);
break;
}
SystemMessage msg(SystemMessage::Finish); SystemMessage msg(SystemMessage::Finish);
obj->push( Message::transport(msg) ); obj->push( Message::transport(msg) );
...@@ -511,6 +524,9 @@ static bool commandToAll(const string& section, std::shared_ptr<ObjectRepository ...@@ -511,6 +524,9 @@ static bool commandToAll(const string& section, std::shared_ptr<ObjectRepository
} }
catch( ORepFailed ) catch( ORepFailed )
{ {
if( !quiet )
cerr << "..ORepFailed.." << endl;
cout.setf(old_flags); cout.setf(old_flags);
return false; return false;
} }
...@@ -1010,3 +1026,8 @@ int oinfo( const string& args, UInterface& ui, int userparam ) ...@@ -1010,3 +1026,8 @@ int oinfo( const string& args, UInterface& ui, int userparam )
} }
// -------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------
void errDoNotReolve( const std::string& oname )
{
if( verb )
cerr << oname << ": resolve failed.." << endl;
}
...@@ -493,9 +493,16 @@ UniSetTypes::SimpleInfo* <xsl:value-of select="$CLASSNAME"/>_SK::getInfo( CORBA: ...@@ -493,9 +493,16 @@ UniSetTypes::SimpleInfo* <xsl:value-of select="$CLASSNAME"/>_SK::getInfo( CORBA:
ostringstream inf; ostringstream inf;
inf &lt;&lt; i->info &lt;&lt; endl; inf &lt;&lt; i->info &lt;&lt; endl;
inf &lt;&lt; "LogServer: " &lt;&lt; logserv_host &lt;&lt; ":" &lt;&lt; logserv_port &lt;&lt; endl;
if( logserv /* &amp;&amp; userparam &lt; 0 */ ) if( logserv /* &amp;&amp; userparam &lt; 0 */ )
{
inf &lt;&lt; "LogServer: " &lt;&lt; logserv_host &lt;&lt; ":" &lt;&lt; logserv_port
&lt;&lt; ( logserv->isRunning() ? " [RUNNIG]" : " [FAILED]" ) &lt;&lt; endl;
inf &lt;&lt; " " &lt;&lt; logserv->getShortInfo() &lt;&lt; endl; inf &lt;&lt; " " &lt;&lt; logserv->getShortInfo() &lt;&lt; endl;
}
else
inf &lt;&lt; "LogServer: NONE" &lt;&lt; endl;
inf &lt;&lt; dumpIO() &lt;&lt; endl; inf &lt;&lt; dumpIO() &lt;&lt; endl;
inf &lt;&lt; endl; inf &lt;&lt; endl;
auto timers = getTimersList(); auto timers = getTimersList();
......
...@@ -53,8 +53,8 @@ void TestProc::sysCommand( const UniSetTypes::SystemMessage* sm ) ...@@ -53,8 +53,8 @@ void TestProc::sysCommand( const UniSetTypes::SystemMessage* sm )
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
string TestProc::getMonitInfo() string TestProc::getMonitInfo()
{ {
int* p = 0; // int* p = 0;
(*p) = 10; // (*p) = 10;
return ""; return "";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment