void Launcher::servicesFromXML(const anna::xml::Node* servicesNode, bool eventOperation) throw(anna::RuntimeException) {
- //<!ATTLIST stack id CDATA #REQUIRED dictionary CDATA #REQUIRED>
+
+ CommandLine& cl(anna::CommandLine::instantiate());
+ bool allLogsDisabled = cl.exists("disableLogs");
+
+ //<!ATTLIST stack id CDATA #REQUIRED dictionary CDATA #REQUIRED>
const anna::xml::Attribute *id, *dictionary;
// <!ATTLIST node originRealm CDATA #REQUIRED applicationId CDATA #REQUIRED originHost CDATA #IMPLIED cer CDATA #IMPLIED dwr CDATA #IMPLIED allowedInactivityTime CDATA #IMPLIED tcpConnectDelay CDATA #IMPLIED answersTimeout CDATA #IMPLIED ceaTimeout CDATA #IMPLIED watchdogPeriod CDATA #IMPLIED entity CDATA #IMPLIED entityServerSessions CDATA #IMPLIED diameterServer CDATA #IMPLIED diameterServerSessions CDATA #IMPLIED balance (yes | no) #IMPLIED sessionBasedModelsClientSocketSelection (SessionIdLowPart | SessionIdHighPart | SessionIdOptionalPart | RoundRobin) #IMPLIED retries CDATA #IMPLIED log CDATA #IMPLIED splitLog (yes | no) #IMPLIED detailedLog (yes | no) #IMPLIED dumpLog (yes | no) #IMPLIED burstLog (yes | no) #IMPLIED>
*answersTimeout, *ceaTimeout, *watchdogPeriod, *entity, *entityServerSessions,
*diameterServer, *diameterServerSessions, *balance, *sessionBasedModelsClientSocketSelection,
*retries, *log, *splitLog, *detailedLog, *dumpLog, *burstLog;
-
// Never clear services content from here (append new data from xml). At the moment no node removing is implemented in this process
// Stacks
}
// Logs:
- std::string realm = commEngine->getRealm();
- std::string s_log = realm + ".launcher.log"; if (log) s_log = log->getValue();
- bool b_splitLog = (splitLog ? (splitLog->getValue() == "yes") : false);
- bool b_detailedLog = (detailedLog ? (detailedLog->getValue() == "yes") : false);
- bool b_dumpLog = (dumpLog ? (dumpLog->getValue() == "yes") : false);
- std::string s_burstLog = realm + ".launcher.burst"; if (burstLog) s_burstLog = burstLog->getValue();
- a_workingNode->setLogs(s_log, b_splitLog, b_detailedLog, b_dumpLog, s_burstLog);
+ if (!allLogsDisabled) {
+ std::string realm = commEngine->getRealm();
+ std::string s_log = realm + ".launcher.log"; if (log) s_log = log->getValue();
+ bool b_splitLog = (splitLog ? (splitLog->getValue() == "yes") : false);
+ bool b_detailedLog = (detailedLog ? (detailedLog->getValue() == "yes") : false);
+ bool b_dumpLog = (dumpLog ? (dumpLog->getValue() == "yes") : false);
+ std::string s_burstLog = realm + ".launcher.burst"; if (burstLog) s_burstLog = burstLog->getValue();
+ a_workingNode->setLogs(s_log, b_splitLog, b_detailedLog, b_dumpLog, s_burstLog);
+ }
// Lazy initialization for comm engine:
result += "\n to load new nodes once the ADML is started, regardless if command";
result += "\n line '--services' parameter was used or not. Those services which";
result += "\n are not correctly loaded will be ignored to keep the process alive.";
+ result += "\n If you need to load services as deltas, you must firstly load the";
+ result += "\n diameter base dictionary with stack id 0, because all the realms";
+ result += "\n will use this dictionary to encode/decode base protocol messages";
+ result += "\n managed by the communication engine.";
result += "\n";
result += "\ndiameterServerSessions|<integer> Updates the maximum number of accepted connections to diameter";
result += "\n server socket.";
commandLine.add("tmDir", anna::CommandLine::Argument::Optional, "Test manager directory. By default is the current execution directory. Warning: report files could be dump during system testing (see help for management operation 'test|report'); take care about the possible accumulation of files");
commandLine.add("cntRecordPeriod", anna::CommandLine::Argument::Optional, "Counters record procedure period in milliseconds. If missing, default value of 300000 (5 minutes) will be assigned. Value of 0 disables the record procedure.");
commandLine.add("logStatisticSamples", anna::CommandLine::Argument::Optional, "Log statistics samples for the provided concept id list, over './sample.<concept id>.csv' files. For example: \"1,2\" will log concepts 1 and 2. Reserved word \"all\" activates all registered statistics concept identifiers. That ids are shown at context dump (see help to get it).");
+ commandLine.add("disableLogs", anna::CommandLine::Argument::Optional, "Overrides every realm configuration regarding traffic log in order to disable it and ease production or system test startup.", false);
// Communications
commandLine.add("reconnectionPeriod", anna::CommandLine::Argument::Optional, "Milliseconds to recover diameter client-session when server connection has been broken. If missing, default value of 10000 will be assigned");