prevent trying to load EmaConfig.xml
Is it possible to prevent totally EMA to try reading the configuration file EmaConfig.xml completely ?
I am specifying the configuration from code using EmaFactory.createOmmConsumerConfig() and adding my own parameters.
However, the following are still showing in the logs, and they could be misinterpreted:
2017-01-16 11:11:48.422 INFO 33216 --- [ restartedMain] c.t.ema.access.OmmConsumerImpl : loggerMsg ClientName: EmaConfig Severity: Info Text: reading configuration file [EmaConfig.xml] from [D:\src\makoco] loggerMsgEnd
2017-01-16 11:11:48.422 ERROR 33216 --- [ restartedMain] c.t.ema.access.OmmConsumerImpl : loggerMsg ClientName: EmaConfig Severity: Error Text: Cannot locate configuration source EmaConfig.xml loggerMsgEnd
Best Answer
-
Basically, the EMA Java is hard coded to look for the EMAConfig.xml file by default in the EmaConfigImpl.readConfiguration() function. This function is called every time the application calls the EmaFactory.createOmmConsumerConfig(); statement.
The source code is EmaConfigImpl.readConfiguration() in the <Elektron SDK java package>\Ema\Src\main\java\impl\com\thomsonreuters\ema\access\ folder as shown below:
You can modify the source code above to change the behavior, but I strongly suggest you test the application after code changed to verify if there are any unexpected errors.
0
Answers
-
As indicated by Wasin, the current implementation of the libraries will always search for the EmaConfig.xml and log details if not found. If there is a concern regarding the misinterpretation of this log message, you do have the option to suppress the log details. Ema Java utilizes the Logger class so you can create your own log handler and intercept this message.
0 -
That's a shame that this configuration loading is hard coded.
0 -
Hi,
A change to config file loading in EMA Java would be a useful addition to EMA. If this change was made as a pull request via GitHub we would certainly considering incorporating that into the EMA trunk for future releases.
Thanks
Iain
0 -
Both EMAJ and EMA C++ will always attempt to load the config
file, however a config file is not required for either of them. The issue
you are encountering with EMAJ is that the logging level for the config file
messages is set to INFO, which ends up being displayed when running with
default settings. In EMA C++, these are set to a lower log level so they
are not output at the default logging level. We plan to change the log
level in EMAJ to match how EMA C++ was set. This should result in the
config related log messages you see going away unless you switch the log level
from the default (INFO) to something less granular that would again include them.For a quick workaround, and you don’t want to see the message, you
can set logger level to higher level, see the below (assume you are using java.util.logging)-Djava.util.logging.config.file=pathToLoggingConfig/logging.properties
Inside this logger configuration file, you can set logging level
to Warning to override the default.java.util.logging.ConsoleHandler.level=WARNING
Hope this helps!
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛