logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajkumar, Pulpet" <Pulpet.Rajku...@fmr.com>
Subject How to change behavior of FileAppender
Date Wed, 02 Jun 2004 14:36:24 GMT

When I configure log4j (ver 1.2.8) to use FileAppender and if I forget
to specify the filename in the configuration file, then log4j treats the
null filename as a warning and shows the message "Are you using
FileAppender instead of ConsoleAppender?"

Is it possible to change the above behavior to throw an error (via the
errorHandler) instead of a warning? This is similar to the way log4j
acts if it encounters errors in opening the file (specified by the
FileAppender property).

This way if I configure log4j to use file appenders then it will ensure
that I also specify the file name correctly.


View raw message