tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "emerson cargnin" <echofloripa.y...@gmail.com>
Subject Re: My Log4j statements going crazy in catalina.out
Date Fri, 08 Aug 2008 15:46:08 GMT
Hi there sorry for the lack of information.

I'm running tomcat 5.5.26.

logging.properties are in the tomcat/conf folder.
My log4j file is inside tomcat/bin/resources
This is the location where all our resources files are located, to
make transparent the migration from resin to tomcat. I can be sure it
is been read as my tomcat/logs/work.log is being written to, using the
proper log level.

Thanks very much
Emerson

My log4j file:

--------------------------------------------------------------------------------
############################
# Log4J Property File
############################

# com.company.* packages with the logging level set to ERROR
# note that this version of the property will set Log4J to log to a file,
# send emails, and log to /dev/console
log4j.category.com.company=ERROR, FILEAPPENDER

# Stop that HttpClient in AvailabilityMonitor from spamming...
log4j.logger.org.apache.commons.httpclient=ERROR
log4j.logger.httpclient.wire=ERROR

#Mobile log configuration
log4j.category.com.company.mobilesearch=ERROR, MOBILEFILEAPPENDER
log4j.category.com.company.mobilenatretriever=ERROR, MOBILEFILEAPPENDER

# version of the above property that will set Log4J to only log to a file

log4j.category.com.company.java.logging.BottleNeckLogger=ERROR,
BOTTLENECKAPPENDER

############################
# FILEAPPENDER PROPERTIES
############################
# FILEAPPENDER is set to be FileAppender sending its output to com.company.log

log4j.appender.FILEAPPENDER=org.apache.log4j.RollingFileAppender
log4j.appender.FILEAPPENDER.MaxFileSize=10MB
log4j.appender.FILEAPPENDER.MaxBackupIndex=7
log4j.appender.FILEAPPENDER.File=/opt/resin/tomcat/logs/work.log
log4j.appender.FILEAPPENDER.layout=org.apache.log4j.PatternLayout
log4j.appender.FILEAPPENDER.layout.ConversionPattern=%d
[%t-${server_name}] %-5p %c - %m%n

############################
# FILEAPPENDER PROPERTIES
############################
# FILEAPPENDER is set to be FileAppender sending its output to com.company.log

log4j.appender.MOBILEFILEAPPENDER=org.apache.log4j.RollingFileAppender
log4j.appender.MOBILEFILEAPPENDER.MaxFileSize=10MB
log4j.appender.MOBILEFILEAPPENDER.MaxBackupIndex=7
log4j.appender.MOBILEFILEAPPENDER.File=/opt/resin/tomcat/logs/mobileWork.log
log4j.appender.MOBILEFILEAPPENDER.layout=org.apache.log4j.PatternLayout
log4j.appender.MOBILEFILEAPPENDER.layout.ConversionPattern=%d
[%t-${server_name}] %-5p %c - %m%n

############################
# BOTTLENECKAPPENDER PROPERTIES
############################
# BOTTLENECKAPPENDER is used to log CGI requests that take > 3 seconds

log4j.appender.BOTTLENECKAPPENDER=org.apache.log4j.RollingFileAppender
log4j.appender.BOTTLENECKAPPENDER.MaxFileSize=10MB
log4j.appender.BOTTLENECKAPPENDER.MaxBackupIndex=7
log4j.appender.BOTTLENECKAPPENDER.File=/opt/resin/tomcat/logs/bottleneck.log
log4j.appender.BOTTLENECKAPPENDER.layout=org.apache.log4j.PatternLayout
log4j.appender.BOTTLENECKAPPENDER.layout.ConversionPattern=%d
[%t-${server_name}] %-5p %c - %m%n
------------------------------------------------------------------------------------------


My loggings.properties:
------------------------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

handlers = 1catalina.org.apache.juli.FileHandler,
2localhost.org.apache.juli.FileHandler,
3manager.org.apache.juli.FileHandler,
4admin.org.apache.juli.FileHandler,
5host-manager.org.apache.juli.FileHandler,
java.util.logging.ConsoleHandler

.handlers = 1catalina.org.apache.juli.FileHandler,
java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

1catalina.org.apache.juli.FileHandler.level = INFO
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.

2localhost.org.apache.juli.FileHandler.level = INFO
2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.FileHandler.prefix = localhost.

3manager.org.apache.juli.FileHandler.level = INFO
3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.FileHandler.prefix = manager.

4admin.org.apache.juli.FileHandler.level = INFO
4admin.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
4admin.org.apache.juli.FileHandler.prefix = admin.

5host-manager.org.apache.juli.FileHandler.level = INFO
5host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
5host-manager.org.apache.juli.FileHandler.prefix = host-manager.

java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter


############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers
= 2localhost.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level
= INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers
= 3manager.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].level
= INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].handlers
= 4admin.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level
= INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers
= 5host-manager.org.apache.juli.FileHandler

# For example, set the com.xyz.foo logger to only log INFO
# messages:
#org.apache.catalina.startup.ContextConfig.level = INFO
#org.apache.catalina.startup.HostConfig.level = INFO
#org.apache.catalina.session.ManagerBase.level = INFO
----------------------------------------------------------------------------------------------


On 08/08/2008, Christopher Schultz <chris@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Emerson,
>
> emerson cargnin wrote:
> | In tomcat, though, even if my log file has only ERROR statements,
> | catalina.out seems to be getting all INFO, DEBUG from my application.
> | I couldnt' find anything in loggin properties that would set at ROOT
> | level.
>
> Could you post your log4j configuration and your logging.properties?
> That would help immensely. Also, please tell us where each file is
> deployed into your running TC instance. Also, maybe what version of TC
> you are running.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkicUXEACgkQ9CaO5/Lv0PBjvACeO+AZhR6EuUXFa6qAsrVvsO/d
> Cw8AoLimAhiB0+ODYRkjZtvLBv95pZbK
> =x/s9
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message