Commit 3e4e6738 authored by Pavel Vainerman's avatar Pavel Vainerman

(unset-codegen): Исправлена ошибка с обработкой параметров запука LogServer.

(uniset2-log): для команды -m (список логов) сделан выход после вывода ответа.
parent 1d626e44
......@@ -104,6 +104,7 @@ int main( int argc, char** argv )
case 'm':
cmd = LogServerTypes::cmdList;
cmdonly = 1;
break;
case 'o':
......
......@@ -713,7 +713,7 @@ end_private(false)
loga->add(ulog());
logserv = make_shared<LogServer>(loga);
logserv->init( argprefix + "-logserver", confnode );
logserv->init( argprefix + "logserver", confnode );
<xsl:for-each select="//smap/item">
<xsl:if test="normalize-space(@no_check_id)!='1'">
......@@ -752,10 +752,10 @@ end_private(false)
UniXML::iterator it(cnode);
// ------- init logserver ---
if( findArgParam("--" + argprefix + "-run-logserver", conf-&gt;getArgc(), conf-&gt;getArgv()) != -1 )
if( findArgParam("--" + argprefix + "run-logserver", conf-&gt;getArgc(), conf-&gt;getArgv()) != -1 )
{
logserv_host = conf-&gt;getArg2Param("--" + argprefix + "-logserver-host", it.getProp("logserverHost"), "localhost");
logserv_port = conf-&gt;getArgPInt("--" + argprefix + "-logserver-port", it.getProp("logserverPort"), getId());
logserv_host = conf-&gt;getArg2Param("--" + argprefix + "logserver-host", it.getProp("logserverHost"), "localhost");
logserv_port = conf-&gt;getArgPInt("--" + argprefix + "logserver-port", it.getProp("logserverPort"), getId());
}
forceOut = conf->getArgPInt("--" + argprefix + "force-out",it.getProp("forceOut"),false);
......@@ -1104,7 +1104,7 @@ askPause(uniset_conf()->getPIntProp(cnode,"askPause",2000))
loga-&gt;add(ulog());
logserv = make_shared&lt;LogServer&gt;(loga);
logserv-&gt;init( argprefix + "-logserver", confnode );
logserv-&gt;init( argprefix + "logserver", confnode );
si.node = conf->getLocalNode();
......@@ -1117,10 +1117,10 @@ askPause(uniset_conf()->getPIntProp(cnode,"askPause",2000))
UniXML::iterator it(cnode);
// ------- init logserver ---
if( findArgParam("--" + argprefix + "-run-logserver", conf-&gt;getArgc(), conf-&gt;getArgv()) != -1 )
if( findArgParam("--" + argprefix + "run-logserver", conf-&gt;getArgc(), conf-&gt;getArgv()) != -1 )
{
logserv_host = conf-&gt;getArg2Param("--" + argprefix + "-logserver-host", it.getProp("logserverHost"), "localhost");
logserv_port = conf-&gt;getArgPInt("--" + argprefix + "-logserver-port", it.getProp("logserverPort"), getId());
logserv_host = conf-&gt;getArg2Param("--" + argprefix + "logserver-host", it.getProp("logserverHost"), "localhost");
logserv_port = conf-&gt;getArgPInt("--" + argprefix + "logserver-port", it.getProp("logserverPort"), getId());
}
forceOut = conf->getArgPInt("--" + argprefix + "force-out",it.getProp("forceOut"),false);
......
......@@ -3,7 +3,7 @@
ulimit -Sc 1000000
uniset2-start.sh -f ./test --name TestProc --confile test.xml --ulog-add-levels info,crit,warn,level1,level8 \
--sm-ready-timeout 5000
--sm-ready-timeout 5000 --test-run-logserver --test-log-add-levels any
#info,warn,crit,system,level9 > 1.log
#--c-filter-field cfilter --c-filter-value test1 --s-filter-field io --s-filter-value 1
......@@ -159,6 +159,9 @@ void LogReader::readlogs( const std::string& _addr, ost::tpport_t _port, LogServ
{
rlog.warn() << "(LogReader): **** connection timeout.." << endl;
if( cmdonly )
return;
if( readcount > 0 )
n--;
......
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