That seems logical, but still produces no output on the file
webapps/mcd/logs/services.log

Can this be a problem with the definition of the log Object. I am using the
following code:

  static protected org.apache.log4j.Category log =

org.apache.log4j.Category.getInstance(RequestLogger.class.getName());

and then i am using this for example in the Classe RequestLogger which
resides in the package
org.mitsu.mcd.services.requestlog

Must I initialize the log another way to get the right result?

Thanx

Daniel

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On
> Behalf Of Jim Moore
> Sent: Tuesday, May 29, 2001 3:45 PM
> To: 'LOG4J Users Mailing List'
> Subject: RE: How do I append different files to different packages
>
>
> Use the "additivity" flag for the categories.  That tells log4j that you
> want to use just the last appender in its hierarchy.
>
> log4j.category.org.mitsu.mcd.services=debug, another
> log4j.category.org.mitsu.mcd.services.additivity=false
> log4j.appender.another=org.apache.log4j.RollingFileAppender
> log4j.appender.another.File=webapps/mcd/logs/services.log
> log4j.appender.another.MaxFileSize=100KB
> log4j.appender.another.MaxBackupIndex=1
>
> log4j.category.org.mitsu.mcd.services.requestlog=debug, another1
> log4j.category.org.mitsu.mcd.services.requestlog.additivity=false
> log4j.appender.another1=org.apache.log4j.RollingFileAppender
> log4j.appender.another1.File=webapps/mcd/logs/request.log
> log4j.appender.another1.MaxFileSize=100KB
> log4j.appender.another1.MaxBackupIndex=1
>
> log4j.category.org.mitsu.mcd.services.providerlog=debug, another1
> log4j.category.org.mitsu.mcd.services.providerlog.additivity=false
> log4j.appender.another1=org.apache.log4j.RollingFileAppender
> log4j.appender.another1.File=webapps/mcd/logs/provider.log
> log4j.appender.another1.MaxFileSize=100KB
> log4j.appender.another1.MaxBackupIndex=1
>
> ...etc...
>
>
> -----Original Message-----
> From: Daniel Kreuzhofer [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 29, 2001 6:15 AM
> To: [EMAIL PROTECTED]
> Subject: How do I append different files to different packages
>
>
> Hy,
>
> I am actually trying to create different file-appenders for different
> packages. Does anyone really know a working confguration for this. For
> example I would like that all the log entries for the package
> "org.mitsu.mcd.services.requestlog" go to a single file.
>
> I have already tried the following, but it doesnt work
>
> log4j.category.org.mitsu.mcd.services.requestlog=debug, another
> log4j.appender.another=org.apache.log4j.RollingFileAppender
> log4j.appender.another.File=webapps/mcd/logs/request.log
> log4j.appender.another.MaxFileSize=100KB
> log4j.appender.another.MaxBackupIndex=1
>
> What ist wrong with this configuration? Log4j still logs all
> entries for the
> Classes in that package to the main log-file. It doesnt even work if I
> change the first line to a complete Class, for example
>
> log4j.category.org.mitsu.mcd.services.requestlog.RequestLogger=debug,
> another
>
> That also does simply not work
>
> Please help!
>
> Thanx
> Daniel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to