commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Holding <p...@pholding.co.uk>
Subject [logging] Specify the Log4J configuration file from commons-logging.properties
Date Thu, 12 Apr 2012 12:59:01 GMT
Is it possible to specify the name of the Log4J configuration file from
within the commons-logging.properties file?

In the Commons Logging user guide it suggests that this can be done by
setting the "log4j.configuration" parameter in the
commons-logging.properties file and that a default of log4j.properties will
be used if not specified.

I have tried setting "log4j.configuration=log4j-myapp.properties" in
commons-logging.properties 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?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message