You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Shitian Long <lo...@gmail.com> on 2013/01/04 12:18:38 UTC

what is the different between "log4j.configuration" and "log4j.properties"

Hello 

I am wondering what is the different between "log4j.configuration" and "log4j.properties". 
According to the book "Pro Apache Log4j Second Edition"

Quote:

1: The LogManager class looks for the system property log4j.configuration.

2: If the log4j.configuration property is not defined, then it tries to look for a resource named log4j.properties/log4j.xml in the application class path.

From my understanding " log4j.configuration" is a properties plain text file, only different with log4j.properties is extensions. My question is what is the purpose of check log4j.configuration first.

Thanks 






---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: what is the different between "log4j.configuration" and "log4j.properties"

Posted by Gary Gregory <ga...@gmail.com>.
The ".configuration" name is a system property, see the -D JVM option.
It points to a file name. The ".property" name is a file name.

Gary

On Jan 4, 2013, at 6:19, Shitian Long <lo...@gmail.com> wrote:

> Hello
>
> I am wondering what is the different between "log4j.configuration" and "log4j.properties".
> According to the book "Pro Apache Log4j Second Edition"
>
> Quote:
>
> 1: The LogManager class looks for the system property log4j.configuration.
>
> 2: If the log4j.configuration property is not defined, then it tries to look for a resource named log4j.properties/log4j.xml in the application class path.
>
> From my understanding " log4j.configuration" is a properties plain text file, only different with log4j.properties is extensions. My question is what is the purpose of check log4j.configuration first.
>
> Thanks
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org