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 Dulanjanie <du...@wso2.com> on 2008/11/18 06:36:07 UTC
Using both .properties and .xml files
--
Hi,
Is there a way we can use both the log4j.xml file and the
log4j.properties file?
cant seem to find an answer to that...
thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Using both .properties and .xml files
Posted by Dulanjanie <du...@wso2.com>.
thanks for your help!
I'm already using the log4j.properties file to configure log4j. But i
need to use some filters for what I'm doing now. What i want to do is,
use the .properties file to configure all appenders except for ones that
need to do some filtering. The thing is... i cant meddle with the
logging implementation... i need to be able to plug-in whatever i do to
a given application.
Is this possible?
On Tue, 2008-11-18 at 00:43 -0600, Curt Arnold wrote:
> On Nov 17, 2008, at 11:36 PM, Dulanjanie wrote:
>
> >
> > --
> >
> > Hi,
> > Is there a way we can use both the log4j.xml file and the
> > log4j.properties file?
> > cant seem to find an answer to that...
> > thanks!
> >
> The default configuration strategy will load log4j.xml preferentially
> over log4j.properties. However, you could come up with arbitrary
> behaviors if you explicitly configured log4j. Calls to configurators
> are cumulative (unless reset is specified in the file), so you could
> call PropertyConfigurator.configure() and then
> DOMConfigurator.configure().
>
> Could you describe what you are trying to accomplish?
>
>
> ---------------------------------------------------------------------
> 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: Using both .properties and .xml files
Posted by Curt Arnold <ca...@apache.org>.
On Nov 17, 2008, at 11:36 PM, Dulanjanie wrote:
>
> --
>
> Hi,
> Is there a way we can use both the log4j.xml file and the
> log4j.properties file?
> cant seem to find an answer to that...
> thanks!
>
The default configuration strategy will load log4j.xml preferentially
over log4j.properties. However, you could come up with arbitrary
behaviors if you explicitly configured log4j. Calls to configurators
are cumulative (unless reset is specified in the file), so you could
call PropertyConfigurator.configure() and then
DOMConfigurator.configure().
Could you describe what you are trying to accomplish?
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org