logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Corbin, James" <James.Cor...@starwoodhotels.com>
Subject RE: Different appenders, different packages to log
Date Thu, 06 Mar 2003 18:06:43 GMT

Steve,

If the logger is defined as com.a, will classes defined in a sub-package
named com.a.a1 get logged to the appender defined for the com.a logger, or
just classes defined in the com.a package?

J.D.

-----Original Message-----
From: Ebersole, Steven [mailto:steven.ebersole@vignette.com] 
Sent: Thursday, March 06, 2003 11:01 AM
To: 'Log4J Users List'
Subject: RE: Different appenders, different packages to log

Similar example of this set up are available all over the documentation
(http://jakarta.apache.org/log4j/docs/manual.html)...

However, its so simple, here's the solution:


log4j.rootLogger=DEBUG, STDOUT

log4j.logger.com.a=DEBUG, MYAPPENDER-1
log4j.additivity.com.a=false

log4j.logger.com.b=DEBUG, MYAPPENDER-2
log4j.additivity.com.b=false

# Definition of the STDOUT, MYAPPENDER-1, MYAPPENDER-2 appenders...


Thats it





    |-----Original Message-----
    |From: Yuriy Zubarev [mailto:Yuriy.Zubarev@TELUS.COM]
    |Sent: Thursday, March 06, 2003 11:42 AM
    |To: log4j-user@jakarta.apache.org
    |Subject: Different appenders, different packages to log
    |
    |
    |Hello everyone,
    |
    |I have an application, for instance, that has set of classes
    |organized into 2 package:
    |
    |com.a
    |com.b
    |
    |My goal is to have Log4J redirecting everything pertaining
    |to "com.a" package into one file, and "com.b" - another.
    |I don't need to tell between log levels. I couldn't find
    |any info on the Internet on how to achieve this.
    |
    |Any hint is very appreciated.
    |
    |Thanks,
    |Yuriy
    |
    |
    |-----------------------------------------------------------
    |----------
    |To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
    |For additional commands, e-mail: log4j-user-help@jakarta.apache.org
    |

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
This electronic message transmission contains information from the Company that may be proprietary,
confidential and/or privileged.
The information is intended only for the use of the individual(s) or entity named above. 
If you are not the intended recipient, be
aware that any disclosure, copying or distribution or use of the contents of this information
is prohibited.  If you have received
this electronic transmission in error, please notify the sender immediately by replying to
the address listed in the "From:" field.


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


Mime
View raw message