Date is not shown in TimeStamp in EMA log message.
Hi,
I am trying to configure a Logger programmatically in the Enterprise Message API. But when I am trying to include date in EMA log message
it is still only showing Time not date.
Example of Log:
loggerMsg
TimeStamp: 06:50:59.970
ClientName: ChannelCallbackClient
Severity: Warning
Text: Received ChannelDownReconnecting event on channel Channel
Instance Name Consumer_1_1
RsslReactor 0x0x7fa6ac02f340
RsslChannel 0x0x7fa6ac02ba60
Error Id -1
Internal sysError 107
Error Location /local/jenkins/workspace/RTSDK_Core_DX1/OS/RH8-64/rcdev/source/rtsdk/Cpp-C/Eta/Impl/Reactor/rsslReactorWorker.c:3403
Error Text </local/jenkins/workspace/RTSDK_Core_DX1/OS/RH8-64/rcdev/source/rtsdk/Cpp-C/Eta/Impl/Transport/rsslSocketTransportImpl.c:6165> Error: 1002 ipcConnecting() client connect() failed. System errno: (107)
loggerMsgEnd
Code Snippet:
innerMap.addKeyAscii( "Logger_1", MapEntry::AddEnum, ElementList()
.addEnum( "LoggerType", 0 )
.addAscii( "FileName", m_config.query("emaLogFileName").getString().c_str() )
.addUInt("IncludeDateInLoggerOutput", 1) //Value 1 still does not include date in logger output.
.addUInt("NumberOfLogFiles", 20)
.addUInt("MaxLogFileSize", 100 * 1024 * 1024)
.addEnum( "LoggerSeverity", 1 ).complete() ).complete();
As per the document, IncludeDateInLoggerOutput value 1 should include date. But it is still outputting only Time as shown the log above.
Regards,
Manasendu
Answers
-
Hello @manasendu
Are you using the latest version of the RTSDK? I used the following configuration with the EMA sample Cons 113 and am able to see the date in the logger output. Most likely you are not applying the programmatic configuration correctly. Please try this through the EMAConfig XML first to verify the issue:
EMAConfig.xml
<Consumer> <Name value="Consumer_4"/> <ChannelSet value="Channel_4"/> <Logger value="Logger_1"/> <Dictionary value="Dictionary_1"/> <XmlTraceToStdout value="0"/> </Consumer> . . <LoggerGroup> <LoggerList> <Logger> <Name value="Logger_1"/> <LoggerType value="LoggerType::Stdout"/> <IncludeDateInLoggerOutput value="1" /> <LoggerSeverity value="LoggerSeverity::Verbose"/> </Logger> .
Program output:
loggerMsg TimeStamp: 2025/03/14 12:23:12.329 ClientName: ChannelCallbackClient Severity: Verbose Text: Successfully created a Reactor and Channel(s) Channel name(s) Channel_4 Instance Name Consumer_4_1 loggerMsgEnd loggerMsg TimeStamp: 2025/03/14 12:23:13.807 ClientName: ItemCallbackClient Severity: Verbose Text: Destroyed ItemCallbackClient [Consumer_4_1] loggerMsgEnd loggerMsg TimeStamp: 2025/03/14 12:23:13.808 ClientName: DictionaryCallbackClient Severity: Verbose Text: Destroyed DictionaryCallbackClient loggerMsgEnd
0 -
Hi @Gurpreet
I am using Ema 3.8.2 version. Checked with EmaConfig.xml. In the log it is showing Date & Time.
<LoggerGroup>
<LoggerList>
<Logger>
<Name value="Logger_1"/>
<LoggerType value="LoggerType::File"/>
<!-- FileName is optional: defaulted to "emaLog_<process id>.log" -->
<FileName value="TestingLog"/>
<LoggerSeverity value="LoggerSeverity::Verbose"/>
<IncludeDateInLoggerOutput value="1" />
</Logger>
</LoggerList>
</LoggerGroup>
It is working fine (showing date & time) if I use EmaConfig.xml.
But programatically it is not working.
In the code:
innerMap.addKeyAscii( "Logger", MapEntry::AddEnum, ElementList()
.addAscii( "Name", "Logger_1" )
.addEnum( "LoggerType", 0 )
.addAscii( "FileName", "TestingLog" )
.addUInt("IncludeDateInLoggerOutput", 1) //Value 1 still does not include date in logger output.
.addUInt("NumberOfLogFiles", 2)
.addUInt("MaxLogFileSize", 100 * 1024 * 1024)
.addEnum( "LoggerSeverity", 0 ).complete() ).complete();I can see it is picking up the correct file name, severity of the log is verbose (if I change this value to 1 (Success) it works fine).
But it is not taking account "IncludeDateInLoggerOutput".
Thanks!
0 -
Yes, I tried it for RTSDK C++ and it doesn't work programmatically for me either. We will wait for my other colleagues to see if we are missing something before raising it as an issue on the GitHub.
0 -
It could be a bug in the library. I have submitted this issue on GitHub.
You can track the progress from the submitted issue#304.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛