Thanx

Can's say that this was easy extractable from the manual. BTW, your
suggestion does not work, because you have to state the default priority as
well

log4j.category.<cat name>=<min-priority>, <appender-name>

I still miss the exhaustive list of properties. Is it possible to set the
additivity flag from via the properties file?

--

Thomas




| -----Original Message-----
| From: Thilo Schottelius [mailto:[EMAIL PROTECTED]]
| Sent: 13 June 2001 14:08
| To: 'LOG4J Users Mailing List'
| Subject: RE: Configuration problems
|
|
| Dear Thomas,
| you forget to assign the appender to your category:
|                               ---------appender name
|                               |
| log4j.category.test1=test1
|                    ^
|                    |
| -----------------| (category)
|
| Thilo
|
| -----Original Message-----
| From: Thomas Tuft Muller [mailto:[EMAIL PROTECTED]]
| Sent: Mittwoch, 13. Juni 2001 14:50
| To: [EMAIL PROTECTED]
| Subject: Configuration problems
|
|
| Hi,
|
| I'm trying to log messages for separate categories to separate appenders
| (and to no others), and I want to configure it statically and not
| programmatically.
|
| log4j.rootCategory=debug, main
| log4j.appender.main=org.apache.log4j.ConsoleAppender
| log4j.appender.main.layout=org.apache.log4j.PatternLayout
|
| log4j.appender.test1=org.apache.log4j.FileAppender
| log4j.appender.test1.File=c:\\temp\\test1.log
| log4j.appender.test1.layout=org.apache.log4j.PatternLayout
|
| ... does not work. Test1 is never initialized.
|
| log4j.rootCategory=debug, main, test1
| log4j.appender.main=org.apache.log4j.ConsoleAppender
| log4j.appender.main.layout=org.apache.log4j.PatternLayout
|
| log4j.appender.test1=org.apache.log4j.FileAppender
| log4j.appender.test1.File=c:\\temp\\test1.log
| log4j.appender.test1.layout=org.apache.log4j.PatternLayout
|
| Does not do what I want, since everything logged to root is appended to
| test1, and I only want the Category 'test1' to log to the
| 'test1.log' file.
|
| I can do it programmatically like this:
|
| Category test1 = Category.getInstance( "test1" );
| test1.addAppender( new FileAppender( new PatternLayout(),
| "c:\\temp\\test1.log" ) );
| test1.setAdditivity( false );
|
| But this takes away the advantage of configuring all logging one place.
|
| Any ideas?
|
| Another thing; the documentation does not seem to have an
| exhaustive list of
| all possible prefined properties. Or does it?
|
| --
|
| Thomas
|
|
|
| *************************************************************************
| Copyright ERA Technology Ltd. 2001. (www.era.co.uk). All rights reserved.
| Confidential. No liability whatsoever is accepted for any loss or damage
| suffered as a result of accessing this message or any attachments.
|
| ---------------------------------------------------------------------
| 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]
|
|



*************************************************************************
Copyright ERA Technology Ltd. 2001. (www.era.co.uk). All rights reserved. 
Confidential. No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.

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

Reply via email to