Scott Burns | 1 Jul 12:43 2003

Logging appears in catalina out

We have written a wrapper around log4j.  Each web application logs to a
file specified in its property file.  The problem is that I am seeing
logging messages also appearing in catalina out(Tomcat/4.1.18).  This
does not occur on systems using tomcat 4.0.6.  Below is a sample of one
of the web applications configuration property files.  Any suggestions
or thoughts on why this is getting sent to catalina out would be
appreciated.  Is our setup incorrect? Also I can't changes versions app
servers so this is not an option.  Thanks in advance.

Scott

Web App
log4j.debug=true
log4j.logger.blccpl.common.hook.ichook=DEBUG, IC1
log4j.appender.IC1=org.apache.log4j.RollingFileAppender
log4j.appender.IC1.File=/apps/tomcat/share/logs/ICHook.log
log4j.appender.IC1.layout=org.apache.log4j.PatternLayout
log4j.appender.IC1.layout.ConversionPattern=%d{DATE} [%p] %c{1}.%M -
%m%n
log4j.appender.IC1.MaxFileSize=5000KB
log4j.appender.IC1.MaxBackupIndex=30
Kwok Peng Tuck | 1 Jul 13:07 2003
Picon

Re: Logging appears in catalina out

Hmm, catalina.out usually keeps the stdout, but I don't see a console 
appender any where in your properties file.

Scott Burns wrote:

>We have written a wrapper around log4j.  Each web application logs to a
>file specified in its property file.  The problem is that I am seeing
>logging messages also appearing in catalina out(Tomcat/4.1.18).  This
>does not occur on systems using tomcat 4.0.6.  Below is a sample of one
>of the web applications configuration property files.  Any suggestions
>or thoughts on why this is getting sent to catalina out would be
>appreciated.  Is our setup incorrect? Also I can't changes versions app
>servers so this is not an option.  Thanks in advance.
>
>Scott
>
>
>Web App
>log4j.debug=true
>log4j.logger.blccpl.common.hook.ichook=DEBUG, IC1
>log4j.appender.IC1=org.apache.log4j.RollingFileAppender
>log4j.appender.IC1.File=/apps/tomcat/share/logs/ICHook.log
>log4j.appender.IC1.layout=org.apache.log4j.PatternLayout
>log4j.appender.IC1.layout.ConversionPattern=%d{DATE} [%p] %c{1}.%M -
>%m%n
>log4j.appender.IC1.MaxFileSize=5000KB
>log4j.appender.IC1.MaxBackupIndex=30
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe <at> jakarta.apache.org
(Continue reading)

Ebersole, Steven | 1 Jul 14:04 2003

RE: Logging appears in catalina out

I do not use Tomcat, but if I remember correctly Tomcat itself defines a
root logger programatically and redirects stdout to that logger.

Try setting the additivity for your logger to false, which would stop
messages sent to your logger from also being handled by other loggers higher
in its hierarchy:

log4j.additivity.blccpl.common.hook.ichook=false

-----Original Message-----
From: Scott Burns [mailto:sburns <at> trcinc.com]
Sent: Tuesday, July 01, 2003 5:43 AM
To: Log4J Users List
Subject: Logging appears in catalina out

We have written a wrapper around log4j.  Each web application logs to a
file specified in its property file.  The problem is that I am seeing
logging messages also appearing in catalina out(Tomcat/4.1.18).  This
does not occur on systems using tomcat 4.0.6.  Below is a sample of one
of the web applications configuration property files.  Any suggestions
or thoughts on why this is getting sent to catalina out would be
appreciated.  Is our setup incorrect? Also I can't changes versions app
servers so this is not an option.  Thanks in advance.

Scott

Web App
log4j.debug=true
log4j.logger.blccpl.common.hook.ichook=DEBUG, IC1
log4j.appender.IC1=org.apache.log4j.RollingFileAppender
(Continue reading)

Fruechtenicht, Torben | 1 Jul 17:56 2003

AW: Multiple configuration files - single contra multiple hierarchies

Thomas,

I think I have done what you are trying to do - although I used property files and not XML. For my application I
have two property files - one for the global stuff and one for that component which can exist in multiple
instances. The last one contains a lot of placeholders some of which are filled by the Log4J mechanism,
some are handled by my code (filling placeholders in property keys is not supported by log4j). I use these
placeholders to fill in the names of my component instances so that the "instance" loggers can show up in
the default hierarchy of loggers without any naming confusing. Below the named logger for each component
instance, the hierarchy is the same for all because each component instance consists of the same set of sub-components.
So that should be your alternative 1. I didn't go for the second solution, looked like to much overhead to me.
Other alternatives might be using NDC or MDC, haven't used that yet...
The disadvantage is that I have to configure some part of my logging programmatically... 

Hope that helps in any way.

Torben
---
Torben Fruechtenicht
Developer
IT Solutions

UBIS AG                fon:   +49 30 39929-731
Dircksenstraße 42-44   fax:   +49 30 39929-900
D-10178 Berlin         email: tfruechtenicht <at> ubis-ag.com
Germany                web:   http://www.ubis-ag.com
--- 

> -----Ursprüngliche Nachricht-----
> Von: Thomas Muller [mailto:ttm <at> online.no]
> Gesendet: Montag, 30. Juni 2003 17:44
(Continue reading)

Thomas Muller | 2 Jul 15:20 2003
Picon
Picon

RE: Multiple configuration files - single contra multiple hierarchies

Torben,

Thanks for the input. Seems like you've chosen a viable approach. May I
suggest you start using XML configuration files or incorporate interpolation
in PropertyConfigurator yourself?

The second option involves firing up new hierarchies and is actually not
that hard; you find an example in SocketAppender. I'm now lingering between
the two approaches, but I'm for various reasons a bit more inclined to go
for the separate hierarchies approach.

Again, thanks for your thoughts.

--

Thomas

| -----Original Message-----
| From: Fruechtenicht, Torben [mailto:TFruechtenicht <at> ubis-ag.com]
| Sent: 01 July 2003 16:56
| To: Log4J Users List; ttm <at> online.no
| Subject: AW: Multiple configuration files - single contra multiple
| hierarchies
|
|
| Thomas,
|
| I think I have done what you are trying to do - although I used
| property files and not XML. For my application I have two
| property files - one for the global stuff and one for that
(Continue reading)

Tauzell, Dave | 2 Jul 18:04 2003
Picon

RE: Chainsaw V2 - Screenshot

I'm trying to use the SocketHubReceive, but it seems that the setHost()
method is actually defined as setPort() (based on the javadoc ...) so I
can't set the port.

-Dave

-----Original Message-----
From: Scott Deboy [mailto:Scott.Deboy <at> VirtualDesign.Net] 
Sent: Friday, June 27, 2003 2:24 PM
To: Log4J Users List
Subject: RE: Chainsaw V2 - Screenshot

Chainsaw V2 has been moved to the jakarta-log4j module (out of the
sandbox).  Sorry for not notifying the list.  I believe the build.xml
has been updated to build chainsaw v2 as well.

Scott

-----Original Message-----
From: Tauzell, Dave [mailto:Dave.Tauzell <at> RxHub.net] 
Sent: Friday, June 27, 2003 12:21 PM
To: Log4J Users List
Subject: RE: Chainsaw V2 - Screenshot

I checked out the jakarta-log4j-sandbox but there seem to be some
problems:

1. The jdbc stuff won't build so I excluded that
2. The org.apache.log4j.chainsaw* classes seem to be missing. 

(Continue reading)

Dean A. Hoover | 2 Jul 22:03 2003
Picon

can't get log4j under tomcat working

I want to use log4j inside a tomcat application. According
to the log4j short manual, all I have to do is drop my
log4j.properties file into WEB-INF/classes and then I can
just use it. This does not seem to be working. Can someone
help?

I added a log4.properties file to my .war file. Here's
the toc:

      0 Wed Jul 02 15:59:12 EDT 2003 META-INF/
    110 Wed Jul 02 15:59:10 EDT 2003 META-INF/MANIFEST.MF
      0 Wed May 14 01:06:28 EDT 2003 images/
      0 Wed Jul 02 10:10:36 EDT 2003 include/
      0 Tue Jul 01 15:18:38 EDT 2003 css/
   1210 Wed May 14 01:06:28 EDT 2003 login.jsp
    485 Fri Jun 27 15:32:30 EDT 2003 welcome.jsp
   3008 Wed May 14 01:06:28 EDT 2003 images/email2.png
  15284 Wed May 14 01:06:28 EDT 2003 images/email.jpg
   1678 Mon Jun 30 02:16:40 EDT 2003 register2.jsp
   7020 Wed Jul 02 10:10:36 EDT 2003 include/contactinfo.jspf
   2287 Wed May 14 01:06:28 EDT 2003 contact.html
    435 Fri Jun 27 15:38:58 EDT 2003 index.html
    856 Mon Jun 30 13:25:12 EDT 2003 css/default.css
   1729 Mon Jun 30 01:55:04 EDT 2003 register1.jsp
   1203 Wed Jul 02 10:09:20 EDT 2003 register3.jsp
   1211 Tue Jul 01 02:40:44 EDT 2003 register4.jsp
      0 Wed Jul 02 15:59:12 EDT 2003 WEB-INF/
      0 Wed Jul 02 15:59:12 EDT 2003 WEB-INF/classes/
   3526 Wed Jul 02 15:59:10 EDT 2003 WEB-INF/classes/Login.class
  10418 Wed Jul 02 15:59:10 EDT 2003 WEB-INF/classes/Register.class
(Continue reading)

Phillip Qin | 2 Jul 22:13 2003

RE: can't get log4j under tomcat working

Put this line into your log4j.properties and restart Tomcat.

log4j.debug=true

-----Original Message-----
From: Dean A. Hoover [mailto:dhoover <at> rochester.rr.com] 
Sent: July 2, 2003 4:04 PM
To: log4j-user <at> jakarta.apache.org
Subject: can't get log4j under tomcat working

I want to use log4j inside a tomcat application. According
to the log4j short manual, all I have to do is drop my
log4j.properties file into WEB-INF/classes and then I can
just use it. This does not seem to be working. Can someone
help?

I added a log4.properties file to my .war file. Here's
the toc:

      0 Wed Jul 02 15:59:12 EDT 2003 META-INF/
    110 Wed Jul 02 15:59:10 EDT 2003 META-INF/MANIFEST.MF
      0 Wed May 14 01:06:28 EDT 2003 images/
      0 Wed Jul 02 10:10:36 EDT 2003 include/
      0 Tue Jul 01 15:18:38 EDT 2003 css/
   1210 Wed May 14 01:06:28 EDT 2003 login.jsp
    485 Fri Jun 27 15:32:30 EDT 2003 welcome.jsp
   3008 Wed May 14 01:06:28 EDT 2003 images/email2.png
  15284 Wed May 14 01:06:28 EDT 2003 images/email.jpg
   1678 Mon Jun 30 02:16:40 EDT 2003 register2.jsp
   7020 Wed Jul 02 10:10:36 EDT 2003 include/contactinfo.jspf
(Continue reading)

Dean A. Hoover | 3 Jul 09:15 2003
Picon

Re: can't get log4j under tomcat working

I did (see following updated file) and still no log file. Also,
I am deploying using ant. Once I get this working, I don't
really have to restart all of tomcat, do I?

log4j.debug=true

log4j.rootLogger=DEBUG, roll

log4j.appender.roll=org.apache.log4j.RollingFileAppender
log4j.appender.roll.File=/tmp/migrasponder.log
log4j.appender.roll.MaxFileSize=100KB
log4j.appender.roll.MaxBackupIndex=1
log4j.appender.roll.layout=org.apache.log4j.PatternLayout
log4j.appender.roll.layout.ConversionPattern=%d [%t] %-5p %F:%L - %m%n

Dean Hoover

Phillip Qin wrote:

>Put this line into your log4j.properties and restart Tomcat.
>
>log4j.debug=true
>
>-----Original Message-----
>From: Dean A. Hoover [mailto:dhoover <at> rochester.rr.com] 
>Sent: July 2, 2003 4:04 PM
>To: log4j-user <at> jakarta.apache.org
>Subject: can't get log4j under tomcat working
>
>I want to use log4j inside a tomcat application. According
(Continue reading)

Ceki Gülcü | 3 Jul 09:21 2003
Picon

Re: can't get log4j under tomcat working


Did you see any log4j output on the console? BTW, the console is redirected 
by tomcat.

At 03:15 AM 7/3/2003 -0400, Dean A. Hoover wrote:
>I did (see following updated file) and still no log file. Also,
>I am deploying using ant. Once I get this working, I don't
>really have to restart all of tomcat, do I?
>
>log4j.debug=true
>
>log4j.rootLogger=DEBUG, roll
>
>log4j.appender.roll=org.apache.log4j.RollingFileAppender
>log4j.appender.roll.File=/tmp/migrasponder.log
>log4j.appender.roll.MaxFileSize=100KB
>log4j.appender.roll.MaxBackupIndex=1
>log4j.appender.roll.layout=org.apache.log4j.PatternLayout
>log4j.appender.roll.layout.ConversionPattern=%d [%t] %-5p %F:%L - %m%n
>
>Dean Hoover
>
>Phillip Qin wrote:
>
>>Put this line into your log4j.properties and restart Tomcat.
>>
>>log4j.debug=true
>>
>>-----Original Message-----
>>From: Dean A. Hoover [mailto:dhoover <at> rochester.rr.com] Sent: July 2, 2003 
(Continue reading)


Gmane