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 d1ve blu3 <d1...@gmail.com> on 2009/11/20 08:49:04 UTC

one project multiple log files

hi,,

i'm new to this group.

I've manage to generate 2 log files. but it seems both content are same,,

what i want to know is it possible to generate two log files with
different content?
example:
I had a java project. it have 2 packager. "com.one" and "com.two".
What i want now is to log every class in "com.one" to one.log and log
every class in "com.two" to two.log.

is it possible???

thanks before,,,

-- 
This transmission may contain confidential or privileged material. Any use of
this information by anyone other than the intended recipient is prohibited. If
you have received this transmission in error, please immediately throw
away your computer because this message will explode in 10 second.

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


Re: one project multiple log files

Posted by Matt Brown <ms...@gmail.com>.
What does your log4j.xml/properties look like?

What you want is easily achievable, you just need to set it up correctly.

log4j.rootLogger = ERROR

log4j.logger.com.one = DEBUG, ONE
log4j.logger.com.two = DEBUG, two

log4j.appender.ONE = ...
log4j.appender.TWO = ...

etc.

On Fri, Nov 20, 2009 at 2:49 AM, d1ve blu3 <d1...@gmail.com> wrote:

> hi,,
>
> i'm new to this group.
>
> I've manage to generate 2 log files. but it seems both content are same,,
>
> what i want to know is it possible to generate two log files with
> different content?
> example:
> I had a java project. it have 2 packager. "com.one" and "com.two".
> What i want now is to log every class in "com.one" to one.log and log
> every class in "com.two" to two.log.
>
> is it possible???
>
> thanks before,,,
>
> --
> This transmission may contain confidential or privileged material. Any use
> of
> this information by anyone other than the intended recipient is prohibited.
> If
> you have received this transmission in error, please immediately throw
> away your computer because this message will explode in 10 second.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>