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 David Thielen <da...@windward.net> on 2005/09/22 17:17:06 UTC

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

 

 


Re: Problem with duplicate log entries - under Tomcat

Posted by James Stauffer <st...@gmail.com>.
I don't understand what you mean by that.

I use an xml config with Tomcat.  If you just delete properties file
and put an xml file in the same directory it should work fine. 
(Assuming you are using automatic config.)

On 9/22/05, David Thielen <da...@windward.net> wrote:
> Hello;
>
> Thank you. I just tried that but any log4j.logger.net settings then get
> applied to both.
>
> Thanks - dave
>
> Ps - and Tomcat won't work with the xml config files for some reason...
>
>
> -----Original Message-----
> From: James Stauffer [mailto:stauffer.james@gmail.com]
> 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 <da...@windward.net> 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:david@windward.net]
> > Sent: Thursday, September 22, 2005 9:17 AM
> > To: log4j-user@logging.apache.org
> > 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: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
>
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

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


Re: Problem with duplicate log entries - under Tomcat

Posted by James Stauffer <st...@gmail.com>.
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 <da...@windward.net> 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:hoju@visi.com]
> Sent: Thursday, September 22, 2005 10:58 AM
> To: Log4J Users List
> Subject: RE: Problem with duplicate log entries - under Tomcat
>
> Quoting David Thielen <da...@windward.net>:
>
> > 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:stauffer.james@gmail.com]
> > 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 <da...@windward.net> 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:david@windward.net]
> > > Sent: Thursday, September 22, 2005 9:17 AM
> > > To: log4j-user@logging.apache.org
> > > 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: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> >
> >
> > --
> > James Stauffer
> > Are you good? Take the test at http://www.livingwaters.com/good/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

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


RE: Problem with duplicate log entries - under Tomcat

Posted by David Thielen <da...@windward.net>.
Hi;

I don't need the [] in the ids so I will try the xml approach.

Thanks - dave


-----Original Message-----
From: Jacob Kjome [mailto:hoju@visi.com] 
Sent: Thursday, September 22, 2005 10:58 AM
To: Log4J Users List
Subject: RE: Problem with duplicate log entries - under Tomcat

Quoting David Thielen <da...@windward.net>:

> 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:stauffer.james@gmail.com]
> 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 <da...@windward.net> 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:david@windward.net]
> > Sent: Thursday, September 22, 2005 9:17 AM
> > To: log4j-user@logging.apache.org
> > 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: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
>
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>




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


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


RE: Problem with duplicate log entries - under Tomcat

Posted by Jacob Kjome <ho...@visi.com>.
Quoting David Thielen <da...@windward.net>:

> 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:stauffer.james@gmail.com]
> 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 <da...@windward.net> 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:david@windward.net]
> > Sent: Thursday, September 22, 2005 9:17 AM
> > To: log4j-user@logging.apache.org
> > 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: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
>
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>




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


Fix Size - Only One Log File...

Posted by Taranbir I Singh <ta...@in.ibm.com>.
Hi, 

I want to use a Logging mechanism in which:

1. In which I want to fix the log. size... (Lets say X)
2. If the log exceeds that size (X) then old entries in the files should 
be deleted...

At any moment the log size should not increase X and no second log file 
should be created...

Which is the best way to achieve this...

Taran

RE: Problem with duplicate log entries - under Tomcat

Posted by David Thielen <da...@windward.net>.
Hello;

Thank you. I just tried that but any log4j.logger.net settings then get
applied to both.

Thanks - dave

Ps - and Tomcat won't work with the xml config files for some reason...


-----Original Message-----
From: James Stauffer [mailto:stauffer.james@gmail.com] 
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 <da...@windward.net> 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:david@windward.net]
> Sent: Thursday, September 22, 2005 9:17 AM
> To: log4j-user@logging.apache.org
> 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: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

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


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


Re: Problem with duplicate log entries - under Tomcat

Posted by James Stauffer <st...@gmail.com>.
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 <da...@windward.net> 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:david@windward.net]
> Sent: Thursday, September 22, 2005 9:17 AM
> To: log4j-user@logging.apache.org
> 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: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

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


RE: Problem with duplicate log entries - under Tomcat

Posted by David Thielen <da...@windward.net>.
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:david@windward.net] 
Sent: Thursday, September 22, 2005 9:17 AM
To: log4j-user@logging.apache.org
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: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org