You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Christian Grobmeier <gr...@gmail.com> on 2012/04/28 14:30:49 UTC
[log4j2] configuration file names
Hi,
just fixed the docs, which said, log4j2 is looking for log4j.xml /
log4j-test.xml.
It is actually looking for log4j2.xml and log4j2-test.xml
I couldn't find the code if log4j.json is looked up or log4j2.json.
Unfortunately the system param to give an alternate file as config file is:
-Dlog4j.configurationFactory=xyz.xml
If we choose log4j2 as product name, we should rename this to:
log4j2.configurationFactory
right?
Imho the naming should be consistent and always be log4j or log4j2.
My personal favorite is to stick with log4j and of course with the
product name log4j, as already mentioned in another thread
Cheers
Christian
--
http://www.grobmeier.de
https://www.timeandbill.de
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
Re: [log4j2] configuration file names
Posted by Tushar Kapila <tg...@gmail.com>.
log4j +1
classes can have a get version and get friendly name static methods.
On 2012-04-29, Gary Gregory <gg...@apache.org> wrote:
> On Saturday, April 28, 2012, Ralph Goers wrote:
>
>> See below -
>>
>> On Apr 28, 2012, at 5:30 AM, Christian Grobmeier wrote:
>>
>> > Hi,
>> >
>> > just fixed the docs, which said, log4j2 is looking for log4j.xml /
>> > log4j-test.xml.
>> > It is actually looking for log4j2.xml and log4j2-test.xml
>>
>> Yes, that is correct. Thanks for fixing it.
>>
>> >
>> > I couldn't find the code if log4j.json is looked up or log4j2.json.
>>
>> ConfigurationFactory defines the prefixes, log4j2 and log4j2-test. Each
>> individual ConfigurationFactory implementation has a method named
>> getSupportedTypes that returns the file extensions that
>> ConfigurationFactory handles. In the case of JSONConfigurationFactory it
>> returns .json and .jsn. ConfigurationFactory would then determine
>> whether
>> JSONConfigurationFactory should be used by looking for a configuration
>> file
>> that ends with one of the suffixes.
>>
>> >
>> > Unfortunately the system param to give an alternate file as config file
>> is:
>> > -Dlog4j.configurationFactory=xyz.xml
>> >
>> > If we choose log4j2 as product name, we should rename this to:
>> > log4j2.configurationFactory
>
>
> Please, please, please, let's keep it "log4j"
>
> Gary
>
>> >
>> > right?
>>
>> Yes - if we stick with log4j2 then it would make sense to change that.
>>
>> Ralph
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> log4j-dev-unsubscribe@logging.apache.org<javascript:;>
>> For additional commands, e-mail:
>> log4j-dev-help@logging.apache.org<javascript:;>
>>
>>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
> Spring Batch in Action: http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
>
--
Sent from my mobile device
Regards
Tushar Kapila
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
Re: [log4j2] configuration file names
Posted by Gary Gregory <gg...@apache.org>.
On Saturday, April 28, 2012, Ralph Goers wrote:
> See below -
>
> On Apr 28, 2012, at 5:30 AM, Christian Grobmeier wrote:
>
> > Hi,
> >
> > just fixed the docs, which said, log4j2 is looking for log4j.xml /
> > log4j-test.xml.
> > It is actually looking for log4j2.xml and log4j2-test.xml
>
> Yes, that is correct. Thanks for fixing it.
>
> >
> > I couldn't find the code if log4j.json is looked up or log4j2.json.
>
> ConfigurationFactory defines the prefixes, log4j2 and log4j2-test. Each
> individual ConfigurationFactory implementation has a method named
> getSupportedTypes that returns the file extensions that
> ConfigurationFactory handles. In the case of JSONConfigurationFactory it
> returns .json and .jsn. ConfigurationFactory would then determine whether
> JSONConfigurationFactory should be used by looking for a configuration file
> that ends with one of the suffixes.
>
> >
> > Unfortunately the system param to give an alternate file as config file
> is:
> > -Dlog4j.configurationFactory=xyz.xml
> >
> > If we choose log4j2 as product name, we should rename this to:
> > log4j2.configurationFactory
Please, please, please, let's keep it "log4j"
Gary
> >
> > right?
>
> Yes - if we stick with log4j2 then it would make sense to change that.
>
> Ralph
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org<javascript:;>
> For additional commands, e-mail: log4j-dev-help@logging.apache.org<javascript:;>
>
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
Spring Batch in Action: http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
Re: [log4j2] configuration file names
Posted by Ralph Goers <ra...@dslextreme.com>.
See below -
On Apr 28, 2012, at 5:30 AM, Christian Grobmeier wrote:
> Hi,
>
> just fixed the docs, which said, log4j2 is looking for log4j.xml /
> log4j-test.xml.
> It is actually looking for log4j2.xml and log4j2-test.xml
Yes, that is correct. Thanks for fixing it.
>
> I couldn't find the code if log4j.json is looked up or log4j2.json.
ConfigurationFactory defines the prefixes, log4j2 and log4j2-test. Each individual ConfigurationFactory implementation has a method named getSupportedTypes that returns the file extensions that ConfigurationFactory handles. In the case of JSONConfigurationFactory it returns .json and .jsn. ConfigurationFactory would then determine whether JSONConfigurationFactory should be used by looking for a configuration file that ends with one of the suffixes.
>
> Unfortunately the system param to give an alternate file as config file is:
> -Dlog4j.configurationFactory=xyz.xml
>
> If we choose log4j2 as product name, we should rename this to:
> log4j2.configurationFactory
>
> right?
Yes - if we stick with log4j2 then it would make sense to change that.
Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org