Author Message
chukiatdenkongpon
Joined: Nov 7, 2013
Messages: 97
Offline
Hi

I have problem of tomcat log: stdout_xxxxxxx.log always increase to causing low disk space in the App Server when I enable logging in the DD App.

So How can I disable to stamp log in the tomcat log (stdout_xxxxxxx.log ) ?

Because I would like to collect log from the "trace.log" only.

Please give me any suggestion.
Thank you.

Best Regards,
Chukiat D.
NeilGoldsmith
Joined: Nov 6, 2013
Messages: 902
Offline
What version of Tomcat are you running?

Have you modified your logging.properties file in your conf dir?
chukiatdenkongpon
Joined: Nov 7, 2013
Messages: 97
Offline
Hi Neil,

version of Tomcat is 5.5.25

No, I don't modify the logging.properties file in conf.

As checking stdout_xxxxxxx.log, it founds all transaction both INFO info/ DEBUG info from DD app.

Please advise.

THank you
NeilGoldsmith
Joined: Nov 6, 2013
Messages: 902
Offline
Check your log level in log4j.properties file in your common/classes dir.

This link will have more details
http://tomcat.apache.org/tomcat-5.5-doc/logging.html
chukiatdenkongpon
Joined: Nov 7, 2013
Messages: 97
Offline
Hi Neil

This is information detail in log4j.properties file in common/classes dir:-

# Set root category priority to INFO and its only appender to CONSOLE.
# Users may want to alter this.
#log4j.rootCategory=INFO, CONSOLE
log4j.rootCategory=ERROR, CONSOLE
# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=INFO
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n

log4j.rootLogger=DEBUG, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=${catalina.home}/logs/tomcat.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n


And the ddlog4j.properties in /ddapp/data/

#log4j.rootLogger=error, stdout

log4j.logger.Dialog.Designer.TraceWriter.True_OUTBCL1= debug, TTrue_OUTBCL1
log4j.logger.Dialog.Designer.ReportWriter.True_OUTBCL1= debug, RTrue_OUTBCL1


# Console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
#log4j.appender.stdout.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss} %5p - %m%n
log4j.appender.stdout.layout.ConversionPattern=...[True_OUTBCL1 Project]... [%d{dd/MM/yyyy HH:mm:ss,SSS}] (%c:%L) - %5p - %m%n

# Report File.
log4j.appender.RTrue_OUTBCL1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.RTrue_OUTBCL1.File=${dd.apphome}/data/log/report.log
log4j.appender.RTrue_OUTBCL1.DatePattern='.'yyyy-MM-dd
log4j.appender.RTrue_OUTBCL1.layout=org.apache.log4j.PatternLayout
log4j.appender.RTrue_OUTBCL1.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss} %5p - %m%n
log4j.appender.RTrue_OUTBCL1.Encoding=UTF-8
# Trace File.
log4j.appender.TTrue_OUTBCL1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.TTrue_OUTBCL1.File=${dd.apphome}/data/log/trace.log
log4j.appender.TTrue_OUTBCL1.DatePattern='.'yyyy-MM-dd
log4j.appender.TTrue_OUTBCL1.layout=org.apache.log4j.PatternLayout
log4j.appender.TTrue_OUTBCL1.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss} %5p - %m%n
log4j.appender.TTrue_OUTBCL1.Encoding=UTF-8

I already check and I try to configure following the tomcat link as your suggestion.

But the stdout_xxxxxx.log still stamp log transaction which same as the "trace.log".


I can stop the DD app log don't stamp log transaction into the stdout_xxxxxx.log by comment the following line in the ddlog4j.properties in /ddapp/data/ :-

#log4j.logger.Dialog.Designer.TraceWriter.True_OUTBCL1= debug, TTrue_OUTBCL1


But it also will not stamp DD app log transaction into the "trace.log".

So please give me any suggestion.
Thank you.

Chukiat D.
NeilGoldsmith
Joined: Nov 6, 2013
Messages: 902
Offline
Can you change this threshold?
log4j.appender.CONSOLE.Threshold=INFO

Did you manually add that 2nd appender to the log4j.properties file? It should write to tomcat.log so shouldn't be a problem, but by default that one isn't created by Tomcat.
chukiatdenkongpon
Joined: Nov 7, 2013
Messages: 97
Offline
Hi Neil,

I already change threshold to ERROR
log4j.appender.CONSOLE.Threshold=ERROR

But it still stamp all INFO / DEBUG of DD App into stdout_xxxxxxx.log file.

Besides, I have manual add 2nd appender to log4j.properties file.

However, I used to script the 2nd appender. but the result is same.

Please advise.

Thank you.

Chukiat D.
NeilGoldsmith
Joined: Nov 6, 2013
Messages: 902
Offline
It doesn't look like ERROR is an option for Threshold:

"A handler's log level threshold can be set using SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST or ALL."

Try setting it to SEVERE

Another thing you can do is just remove the CONSOLE logger altogether and see if it is still logging.
chukiatdenkongpon
Joined: Nov 7, 2013
Messages: 97
Offline
Hi Neil,

I follow your suggestion for setting Threshold to SEVERE in log4j.properties.

But it still stamp log transaction into the stdout_xxxxxx.log .

Besides, I try to remove the CONSOLE logger altogether
as detail below:-

And the ddlog4j.properties in /ddapp/data/

#log4j.rootLogger=error, stdout

log4j.logger.Dialog.Designer.TraceWriter.True_OUTBCL1= debug, TTrue_OUTBCL1
log4j.logger.Dialog.Designer.ReportWriter.True_OUTBCL1= debug, RTrue_OUTBCL1


# Console
#log4j.appender.stdout=org.apache.log4j.ConsoleAppender
#log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
#log4j.appender.stdout.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss} %5p - %m%n
#log4j.appender.stdout.layout.ConversionPattern=...[True_OUTBCL1 Project]... [%d{dd/MM/yyyy HH:mm:ss,SSS}] (%c:%L) - %5p - %m%n

# Report File.
log4j.appender.RTrue_OUTBCL1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.RTrue_OUTBCL1.File=${dd.apphome}/data/log/report.log
log4j.appender.RTrue_OUTBCL1.DatePattern='.'yyyy-MM-dd
log4j.appender.RTrue_OUTBCL1.layout=org.apache.log4j.PatternLayout
log4j.appender.RTrue_OUTBCL1.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss} %5p - %m%n
log4j.appender.RTrue_OUTBCL1.Encoding=UTF-8
# Trace File.
log4j.appender.TTrue_OUTBCL1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.TTrue_OUTBCL1.File=${dd.apphome}/data/log/trace.log
log4j.appender.TTrue_OUTBCL1.DatePattern='.'yyyy-MM-dd
log4j.appender.TTrue_OUTBCL1.layout=org.apache.log4j.PatternLayout
log4j.appender.TTrue_OUTBCL1.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss} %5p - %m%n
log4j.appender.TTrue_OUTBCL1.Encoding=UTF-8


But the result is same as before.


Please give me any advise.

Chukiat D.
NeilGoldsmith
Joined: Nov 6, 2013
Messages: 902
Offline
Have you made any logging changes to Tomcat after you installed it? By default, it shouldn't log everything to stdout like that.

Have you tried removing this completely from log4j.properties?


# Set root category priority to INFO and its only appender to CONSOLE.
# Users may want to alter this.
#log4j.rootCategory=INFO, CONSOLE
log4j.rootCategory=ERROR, CONSOLE
# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=INFO
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n
chukiatdenkongpon
Joined: Nov 7, 2013
Messages: 97
Offline
Hi Neil,

I don't change change to Tomcat after indtalled it.

Besides, I try to uninstall Tomcat and reinstall Tomcat again. But the result is same.

Besides, I try to completely removing from log4j.properties.

# Set root category priority to INFO and its only appender to CONSOLE.
# Users may want to alter this.
#log4j.rootCategory=INFO, CONSOLE
#log4j.rootCategory=ERROR, CONSOLE
# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
#log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
#log4j.appender.CONSOLE.Threshold=INFO
#log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
#log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n



But it still stamp log transaction into the stdout_xxxxxx.log .

The way that I can do to not stamp log transaction into the stdout_xxxxxx.log is removing the following line in ddlog4j.properties.


And the ddlog4j.properties in /ddapp/data/

#log4j.rootLogger=error, stdout

#log4j.logger.Dialog.Designer.TraceWriter.True_OUTBCL1= debug, TTrue_OUTBCL1

...

But it also don't stamp log into the "trace.log".

Please advise.

Thank you.

Chukiat D.

NeilGoldsmith
Joined: Nov 6, 2013
Messages: 902
Offline
Hmmmm..

Can you post what is in your tomcat/conf/logging.properties file?

In the mean time, if anything looks obvious to you, you might try tweaking those values to see if you can turn it off. For instance, set them to SEVERE to see if that has an affect.
chukiatdenkongpon
Joined: Nov 7, 2013
Messages: 97
Offline
Hi Neil,

This is tomcat/conf/logging.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 = FINE
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.

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

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

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

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

java.util.logging.ConsoleHandler.level = FINE
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 SEVERE
# messages:
#org.apache.catalina.startup.ContextConfig.level = FINE
#org.apache.catalina.startup.HostConfig.level = FINE
#org.apache.catalina.session.ManagerBase.level = FINE


And I will set to "SEVERE" to all instance in logging.properties and let it check affect.

Thank you.

Chukiat D.
NeilGoldsmith
Joined: Nov 6, 2013
Messages: 902
Offline
Ok, try changing those levels and see if it changes anything. I wouldn't imagine the manager, admin, etc has an effect, but might be eaiser to make an across the board change and see what happens, then if it does fix it, put back the ones that are probably not a factor.
chukiatdenkongpon
Joined: Nov 7, 2013
Messages: 97
Offline
Hi Neil,

I try to change levels to SEVERE in logging.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 = SEVERE
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.

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

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

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

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

java.util.logging.ConsoleHandler.level = SEVERE
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 = SEVERE
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler

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

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

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = SEVERE
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 SEVERE
# messages:
#org.apache.catalina.startup.ContextConfig.level = FINE
#org.apache.catalina.startup.HostConfig.level = FINE
#org.apache.catalina.session.ManagerBase.level = FINE

But it still stamp transaction log into the stdout_xxxxxx.log.

Please give me any advise.

Thank you.

Chukiat D.
Go to:   
Mobile view