Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

log4j problem - global logger?

Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

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
There were millions of the little blood suckers. But thanks to this tiny ad, I wasn't bitten once.
We need your help - Coderanch server fundraiser
    Bookmark Topic Watch Topic
  • New Topic