Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SSB as a Log4J logger?  RSS feed

Pratul Chakre
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am trying to create a logging service using Log4J, which uses a JMS Appender with a JDBC Appender that logs messages asynchronously.

And I "have" to that using an EJB. What I am trying to do is encapsulate the logger class in a SSB and expose different methods for the client to access.

In doing so, however, my LocationInfo is lost. Fair enough, since the location info is captured by log4j from the ClassLoader( IMO), which changes for an EJB.

Now, when I am trying to set different parameters in the MDC of the logger object, even that is being retrieved as null.

Could anybody provide any ideas as to what am I missing here? Has anybody tried using a SSB for a logger?

Any pointers would be helpful.

Thanks in Advance.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!