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 Stadelmann Josef <jo...@axa-winterthur.ch> on 2012/02/02 14:19:22 UTC
AW: Configuration Sequence
Looks as if nobody knows it ...
well, I have the sources and can look myself,
but I was so confident that a developer would know it :-(
Josef
-----Ursprüngliche Nachricht-----
Von: Stadelmann Josef [mailto:josef.stadelmann@axa-winterthur.ch]
Gesendet: Donnerstag, 26. Januar 2012 13:37
An: log4j-user@logging.apache.org
Betreff: Configuration Sequence
I have a simpel question :
what is the prioper sequence in configuring log4j.properties
1. logger
2. additivity
3. appenders
4. filters
to reach that all gets parsed but not twice,
if sequences are not correct, I see errors such as, in case of a rolling
file appender
file locked by another user, or in case of a Chainsaw sockethuappender,
socket
address already in use.
What is the rule of dumb in configuration when tomcat startsup and has
to deploy / lauch axis2.war
Josef
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
AW: Configuration Sequence
Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Thank you Scott
the reason why I ask is because I see a lot "already parsed" messages when debug=true is set.
So I was assuming that there is a way to pass configuration records in a proper sequence and
avoid this messages altogether.
The other reason is if I see errors with the Socket hub appender that a port is already in use.
A clear indicator that a configuration record has already been parsed for a given port, resulting
in a port becoming open and its socket gets in-use, hence, a next time parsing will result in a exception.
"address already in use"! I do not yet have a different explanation for that exceptions.
Josef
-----Ursprüngliche Nachricht-----
Von: Scott Deboy [mailto:scott.deboy@gmail.com]
Gesendet: Donnerstag, 2. Februar 2012 16:52
An: Log4J Users List
Betreff: Re: Configuration Sequence
Order in the file doesn't really matter in either case it seems.
For a properties file, PropertyConfigurator does process entries in a
specific order, but it just finds them in the properties file and builds
the entries - here is the code from PropertyConfigurator:
configureRootCategory(properties, hierarchy);
configureLoggerFactory(properties);
parseCatsAndRenderers(properties, hierarchy);
For an xml file, the elements will be processed as they are defined in the
xml file - the DOMConfigurator code parses whatever is found in that order.
Scott
On Thu, Feb 2, 2012 at 5:19 AM, Stadelmann Josef <
josef.stadelmann@axa-winterthur.ch> wrote:
> Looks as if nobody knows it ...
>
> well, I have the sources and can look myself,
> but I was so confident that a developer would know it :-(
>
> Josef
>
> -----Ursprüngliche Nachricht-----
> Von: Stadelmann Josef [mailto:josef.stadelmann@axa-winterthur.ch]
> Gesendet: Donnerstag, 26. Januar 2012 13:37
> An: log4j-user@logging.apache.org
> Betreff: Configuration Sequence
>
> I have a simpel question :
>
> what is the prioper sequence in configuring log4j.properties
>
> 1. logger
> 2. additivity
> 3. appenders
> 4. filters
>
> to reach that all gets parsed but not twice,
>
> if sequences are not correct, I see errors such as, in case of a rolling
> file appender
> file locked by another user, or in case of a Chainsaw sockethuappender,
> socket
> address already in use.
>
> What is the rule of dumb in configuration when tomcat startsup and has
> to deploy / lauch axis2.war
>
> Josef
>
>
>
> ---------------------------------------------------------------------
> 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
Re: Configuration Sequence
Posted by Scott Deboy <sc...@gmail.com>.
Order in the file doesn't really matter in either case it seems.
For a properties file, PropertyConfigurator does process entries in a
specific order, but it just finds them in the properties file and builds
the entries - here is the code from PropertyConfigurator:
configureRootCategory(properties, hierarchy);
configureLoggerFactory(properties);
parseCatsAndRenderers(properties, hierarchy);
For an xml file, the elements will be processed as they are defined in the
xml file - the DOMConfigurator code parses whatever is found in that order.
Scott
On Thu, Feb 2, 2012 at 5:19 AM, Stadelmann Josef <
josef.stadelmann@axa-winterthur.ch> wrote:
> Looks as if nobody knows it ...
>
> well, I have the sources and can look myself,
> but I was so confident that a developer would know it :-(
>
> Josef
>
> -----Ursprüngliche Nachricht-----
> Von: Stadelmann Josef [mailto:josef.stadelmann@axa-winterthur.ch]
> Gesendet: Donnerstag, 26. Januar 2012 13:37
> An: log4j-user@logging.apache.org
> Betreff: Configuration Sequence
>
> I have a simpel question :
>
> what is the prioper sequence in configuring log4j.properties
>
> 1. logger
> 2. additivity
> 3. appenders
> 4. filters
>
> to reach that all gets parsed but not twice,
>
> if sequences are not correct, I see errors such as, in case of a rolling
> file appender
> file locked by another user, or in case of a Chainsaw sockethuappender,
> socket
> address already in use.
>
> What is the rule of dumb in configuration when tomcat startsup and has
> to deploy / lauch axis2.war
>
> Josef
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>