vinays84
03-18-2007, 10:49 PM
Because I can't print errors to the console from a webapp, I'm trying to learn log4j (Apache). The tutorials I've found seem to be made for standalone apps and don't answer all my questions. For any of you out there that have used log4j successfully, I have a couple questions:
What's the difference between using a Category opposed to a Logger object?
Whats the benefit of grabbing those objects specific to a certain class instead of just grabbing the root (eg. Category.getInstance([some class name]) opped to Category.getRoot()) If I were to call the logger directly from a JSP, would one always use the root?
How do you set up so that it logs to a text file? How can it be set up so that a different text file is created in the logging directory per session/day/whatever I choose?
Thanks!
What's the difference between using a Category opposed to a Logger object?
Whats the benefit of grabbing those objects specific to a certain class instead of just grabbing the root (eg. Category.getInstance([some class name]) opped to Category.getRoot()) If I were to call the logger directly from a JSP, would one always use the root?
How do you set up so that it logs to a text file? How can it be set up so that a different text file is created in the logging directory per session/day/whatever I choose?
Thanks!