Also if you give your current log4j.properties and a description of what exactly you want to happen we cna give you more pointers.
On 9/22/05, David Thielen <[EMAIL PROTECTED]> wrote: > Hi; > > I don't need the [] in the ids so I will try the xml approach. > > Thanks - dave > > > -----Original Message----- > From: Jacob Kjome [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 22, 2005 10:58 AM > To: Log4J Users List > Subject: RE: Problem with duplicate log entries - under Tomcat > > Quoting David Thielen <[EMAIL PROTECTED]>: > > > Hello; > > > > Thank you. I just tried that but any log4j.logger.net settings then get > > applied to both. > > Yes, of course it does. If you don't want log4j.logger.net settings to > apply to > appenders defined in the root logger, then set the logger's > (log4j.logger.net) > additivity to false and apply the appender directly to that logger. If you > only want certain levels of messages going to one of those appenders, you > could > always apply both appender to the root logger, but set a threshold on the > appender to only append messages of a certain level. There's lots of ways > to > do things like this in Log4j. You've just got to find the right combination > for your purposes. > > > > > Thanks - dave > > > > Ps - and Tomcat won't work with the xml config files for some reason... > > > > Are you just saying this or repeating something you heard? There is some > truth > to the statement. The reason why an XML config file might not work under > Tomcat is if one of the Tomcat loggers was specified which conflicts with > the > naming constraints of an attribute defined as type "id". For instance, the > following logger would be a problem... > > <logger > name="org.apache.catalina.core.ContainerBase.[Catalina].[localhost]"> > > The "[" and "]" characters are not allowed in an attribute of type "id". > The > log4j.dtd defines the "name" attribute as of type "id", hence we get this > problem in Log4j-1.2.xx. Currently, Log4j-1.3 doesn't use a DTD for it's > JoranConfigurator. As such, when using Log4j-1.3-alpha, you won't run into > this issue. > > Jake > > > > > -----Original Message----- > > From: James Stauffer [mailto:[EMAIL PROTECTED] > > Sent: Thursday, September 22, 2005 10:09 AM > > To: Log4J Users List > > Subject: Re: Problem with duplicate log entries - under Tomcat > > > > I don't think you can have two log4j.rootLogger entries. I don't use > > the properties format (i use xml) so I am not sure how it should be > > done. Possibly something like: > > log4j.rootLogger=warn, stdout, tomcat > > > > On 9/22/05, David Thielen <[EMAIL PROTECTED]> wrote: > > > And if possible I would really like 2 files, one for net.windward(info) > > and > > > one for everything else (warn). > > > > > > Thanks - dave > > > > > > > > > -----Original Message----- > > > From: David Thielen [mailto:[EMAIL PROTECTED] > > > Sent: Thursday, September 22, 2005 9:17 AM > > > To: [email protected] > > > Subject: Problem with duplicate log entries - under Tomcat > > > > > > Hello; > > > > > > I am trying to do the following: > > > > > > 1) Send tomcat info logs and other warn logs to the console > > > 2) Send net.windward info and other warn logs to a file. > > > > > > This is my log file - it is not writing anything to the console and it > is > > > writing all file entries twice. Also it does not rename the file at > > > midnight. HELP! > > > > > > log4j.rootLogger=warn, stdout > > > log4j.rootLogger=warn, tomcat > > > > > > log4j.appender.stdout=org.apache.log4j.ConsoleAppender > > > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout > > > log4j.appender.stdout.layout.ConversionPattern=%p %t %c - %m%n > > > log4j.logger.org.apache.catalina=INFO, stdout > > > > > > log4j.appender.tomcat=org.apache.log4j.DailyRollingFileAppender > > > log4j.appender.tomcat.File=${catalina.home}/logs/tomcat.log > > > log4j.appender.tomcat.layout=org.apache.log4j.PatternLayout > > > > > > log4j.appender.tomcat.layout.ConversionPattern=%d{HH:mm:ss.SSS} %p %t %c > - > > > %m%n log4j.logger.org.apache.catalina=WARN, tomcat > > > log4j.logger.net.windward=INFO, tomcat > > > > > > thanks - dave > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > James Stauffer > > Are you good? Take the test at http://www.livingwaters.com/good/ > > > > --------------------------------------------------------------------- > > 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] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- James Stauffer Are you good? Take the test at http://www.livingwaters.com/good/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
