-
1. Re: How to create a log for my application
adrian.brock Sep 5, 2002 1:06 PM (in response to hollfelder)Under the default config
log.debug("Whatever") only goes to the file.
The console has a threshold of INFO
Regards,
Adran -
2. Re: How to create a log for my application
hollfelder Sep 6, 2002 4:23 AM (in response to hollfelder)Is it possible to have a fileappender to a file myapp.log which is accessed by myapp? And how do I access that? Or must I do that via original log4j API?
Cheers,
Thomas -
4. Re: How to create a log for my application
hollfelder Sep 6, 2002 6:17 AM (in response to hollfelder)Thank you very much,
that was the information that had impact.
Regards,
Thomas -
5. Re: How to create a log for my application
hollfelder Sep 6, 2002 6:41 AM (in response to hollfelder)Sorry,
one last question.
my code now looks like that:
Logger log=Logger.getLogger("com.mypackage.bla.bla");
log.debug("doPost aufgerufen mit action=" + action);
and I have defined a category:
<appender-ref ref="myappender"/>
Is there a way to automatically get a logger for that category because the class who calls it is in package com.mypackage or do I need to code that:
Logger log =Logger.getLogger(getClass().getName());
log.debug("helloWorld");
Thanks,
Thomas -
6. Re: How to create a log for my application
adrian.brock Sep 6, 2002 7:00 AM (in response to hollfelder)Not sure I understand the question?
The code you show is the mechanism to get the logger.
Regards,
Adrian