From: Eduardo Ramos Testillano Date: Thu, 4 Feb 2016 22:42:51 +0000 (+0100) Subject: Add unix timestamp milliseconds to dumpLog messages X-Git-Tag: REFACTORING_TESTING_LIBRARY~41 X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=commitdiff_plain;h=ebd5e0f277e40c4909df678378cea22690aa04fe Add unix timestamp milliseconds to dumpLog messages --- diff --git a/example/diameter/launcher/Launcher.cpp b/example/diameter/launcher/Launcher.cpp index 4cd4052..aaa80be 100644 --- a/example/diameter/launcher/Launcher.cpp +++ b/example/diameter/launcher/Launcher.cpp @@ -104,7 +104,7 @@ const char *ServicesDTD = "\ detailedLog: Insert detailed information at log files (timestamps, communication resources, etc.). Useful\n\ to analyze the messages flow along the sockets (specially on 'balance' mode). Default 'no'.\n\ dumpLog: Write to disk every incoming/outcoming message named as:\n\ - '......xml'\n\ + '.......xml'\n\ Default value 'no'.\n\ burstLog: Burst operations log file. By default '.launcher.burst'. Empty string or \"null\" name, to disable.\n\ Warning: there is no rotation for log files (use logrotate or whatever). Output: dot (.) for each\n\ diff --git a/example/diameter/launcher/OriginHost.cpp b/example/diameter/launcher/OriginHost.cpp index 32044b9..056031f 100644 --- a/example/diameter/launcher/OriginHost.cpp +++ b/example/diameter/launcher/OriginHost.cpp @@ -147,7 +147,10 @@ void OriginHost::writeLogFile(const anna::diameter::codec::Message &decodedMessa } if(a_dumpLog) { - std::string name = getMyDiameterEngine()->getOriginHost(); + // .......xml + std::string name = anna::functions::asString((anna::Millisecond)anna::functions::millisecond()); + name += "."; + name += getMyDiameterEngine()->getOriginHost(); name += "."; name += anna::functions::asString(decodedMessage.getHopByHop()); name += "."; diff --git a/example/diameter/launcher/resources/services_examples/services.dtd b/example/diameter/launcher/resources/services_examples/services.dtd index 9cdcd88..00808a4 100755 --- a/example/diameter/launcher/resources/services_examples/services.dtd +++ b/example/diameter/launcher/resources/services_examples/services.dtd @@ -63,7 +63,7 @@ detailedLog: Insert detailed information at log files (timestamps, communication resources, etc.). Useful to analyze the messages flow along the sockets (specially on 'balance' mode). Default 'no'. dumpLog: Write to disk every incoming/outcoming message named as: - '......xml' + '.......xml' Default value 'no'. burstLog: Burst operations log file. By default '.launcher.burst'. Empty string or "null" name, to disable. Warning: there is no rotation for log files (use logrotate or whatever). Output: dot (.) for each