Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • EMA /
avatar image
Question by Susan Genoray · Jun 01, 2016 at 05:48 AM · emajavaslf4j

How to configure EMA Java to use log4j as the underlying logging backend?​

In the EMA Java Developer Guide, it mentions that EMA Java can have underlying logging backend to be Java standard logger (java.util.logging), log4j, or other loggers implementing SLF4J logging interface. I want to use log4j logging framework with EMA Java, how to configure EMA Java to use log4j as the underlying logging backend?

Steven McCoy

People who like this

1 Show 1
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Steven McCoy ♦♦ · Jun 01, 2016 at 12:45 PM 0
Share

Please note the log4j1 project reached end-of-life as of August 5, 2015.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Steven McCoy · Jun 01, 2016 at 08:22 AM

EMA/Java uses SLF4J, there are simple drop in jars from each logging API that act as a binding to automatically connect to log4j2 or otherwise.

For log4j2, simply add the SLF4J API and binding to the class path:

log4j-api-2.0.jar:log4j-core-2.0.jar:log4j-slf4j-impl-2.0.jar:slf4j-api-1.7.12.jar

Capture the EMA output with the following in log4j2.xml:

<Logger name="com.thomsonreuters.ema.access" level="trace" additivity="false">
  <AppenderRef ref="Console"/>
</Logger>

For log4j1, use the matching jars per the SLF4J manual:

slf4j-log4j12-1.7.21.jar:slf4j-api-1.7.21.jar

For J.U.L., documented on the same page above:

slf4j-jdk14-1.7.21.jar:slf4j-api-1.7.21.jar

For Logback, a popular alternative to log4j1:

logback-classic-1.0.13.jar:logback-core-1.0.13.jar:slf4j-api-1.7.21.jar
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
5 People are following this question.

Related Questions

How to filter with certain fields

How to enable tracing incoming/outgoing messages EMA Java receives/sends

Invalid Field

How can we avoid too many updates with .qos(Timeliness, qosRates) and conflatedInUpdates() methods ?

How obtain the price of a future option when market is closed

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges