Internal log4j logging
1 posts in topic
Flat View  Flat View

Posted By:   daniel_n
Posted On:   Sunday, June 26, 2005 05:18 AM

I created XML configuration file for log4j which contains a file appender. I did not specify a file name in the XML file because I only know the filename during run-time. Whenever my program loads, log4j prints out a warning message saying "File option not set for appender. Are you using FileAppender instead of ConsoleAppender?"
Which is a legitimate message in this case.
However, is there a way to configure log4j NOT to print this message, other than disabling all internal logging?
Maybe a way to change inernal logging's level?

Thanks in advace!


Re: Internal log4j logging

Posted By:   daniel_n  
Posted On:   Sunday, June 26, 2005 08:12 AM

Ok folks, I have found a solution -
Just declare in the log4j xml configuration file, and in your program, just before loading the configuration file, initialize the file.name system property to your desired file name. Thats it.

Thanks ne way...
About | Sitemap | Contact