From ebd5e0f277e40c4909df678378cea22690aa04fe Mon Sep 17 00:00:00 2001 From: Eduardo Ramos Testillano Date: Thu, 4 Feb 2016 23:42:51 +0100 Subject: [PATCH] Add unix timestamp milliseconds to dumpLog messages --- example/diameter/launcher/Launcher.cpp | 2 +- example/diameter/launcher/OriginHost.cpp | 5 ++++- .../launcher/resources/services_examples/services.dtd | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) 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 -- 2.20.1