logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tushar Kapila <tgkp...@gmail.com>
Subject Re: How do I hook in before log4j starts?
Date Mon, 18 Jul 2011 20:55:59 GMT
Can try - When your app start make sure the first class that runs does
not have a log4j instance member or other reference to log4j besides
the repository call. Use system out till then.

On 7/19/11, Turner, Jay <Jay.Turner@sabre-holdings.com> wrote:
> I call my Library Jar which has log4j setup in it. I'm calling a static
> method in my class. Before I can get to the
> LogManager.setRepositorySelector, log4j gets to run, loads its configuration
> from log4j.configuration, can't interpret the unrecognized parameters, and
> generally finishes initialization. I suspect that when I enter the Library
> to run a static method that all of the other statics are run, along with the
> statics in log4j.jar. So log4j initializes before you can get a chance to
> setup anything. Unless I'm missing something, how can I get around this
> Catch-22?
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message