commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject Re: [logging] Specify the Log4J configuration file from
Date Sat, 14 Apr 2012 15:03:09 GMT
2012/4/12 Paul Holding <>:
> Is it possible to specify the name of the Log4J configuration file from
> within the file?
> In the Commons Logging user guide it suggests that this can be done by
> setting the "log4j.configuration" parameter in the
> file and that a default of will
> be used if not specified.
> I have tried setting "" in
> however Log4J throws an error saying that it
> hasn't been configured. The only way I can specify the name of the Log4J
> configuration file seems be using the -Dlog4j.configuration=<your_file> at
> the command line or using System.setProperty("log4j.configuration",
> "<your_file>");
> Have I misinterpreted the text in the Commons Logging user guide regarding
> Log4J or is there something I'm missing?

The user guide (1.1.1) says literally:
" Use this system property to
specify the name of a Log4J configuration file."

Nowhere it says that file has any influence
on the system properties.

So, I disagree with Christian.

I'd say it is Log4J matter how it finds its own configuration file.
>From responsibilities point of view it has nothing to do with Commons
Logging. (Just guessing, without looking at the sources).

The rest of setting mentioned in that section ("log4j.rootCategory"
and below)  are set in file.  This explains for me
the words written above the options list (note the "and"):

"Configure Log4J using system properties and/or a properties file:" (...)


Best regards,
Konstantin Kolinko

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message