Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

log4j problem - global logger?  RSS feed

 
Turian Vlad
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys.
I hope this is the right place to post a question about log4j. if not please redirect me to the appropriate thread.

So...what i want to do is to write a logging implementation that uses log4j to log to a database.
i use an the jdbc appender from http://www.mannhaupt.com/danko/projects/index.html

it all goes well when i use it to log from a single class, but when i try to instantiate another class that logs something in the database, that log doesn't end up in the database.

my code is:












in the database only the log that LogTest made arrives i.e logger.debug("debug")

is there a way to capture the logs of all the classes that i'm instantiating in my class?

i need this because i need to log messages that come from a third party tool to which's source code i do not have access.

Thank you very much,
Vlad Turian
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!