Solved

How to turn off logging to console

Posted on 2008-06-23
4
2,879 Views
Last Modified: 2012-06-21
My log4j.properties file look like this:

log4j.rootLogger=INFO, R1,R2,R3,R4,R5

# ***** R is set to be a RollingFileAppender.
log4j.appender.R1=org.apache.log4j.RollingFileAppender
log4j.appender.R1.File=/../debug.log
log4j.appender.R1.threshold=DEBUG
# ***** Max file size is set to 1000KB
log4j.appender.R1.MaxFileSize=1000KB
# ***** Keep one backup file
log4j.appender.R1.MaxBackupIndex=1
# ***** R uses PatternLayout.
log4j.appender.R1.layout=..
log4j.appender.R1.layout.ConversionPattern=..

same to info, warn, fatal and so on.

I never specified Console Appender, But still it is writing to the console, How to turn off the console logging?
0
Comment
Question by:srikanthradix
  • 2
  • 2
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 21851494
is the logging coming from log4j?
may be classes writing to stdout
0
 
LVL 92

Expert Comment

by:objects
ID: 21851507
have a look at your container cofig to see how it handles stdout
0
 

Author Comment

by:srikanthradix
ID: 21857322
I am actually using Spring, which internally uses commons-logging.jar to log which i want to disable. The logging it is shown in the code snippet.
container config? I am using WebSphere. Please suggest.



Jun 24, 2008 9:06:33 AM org.springframework.core.CollectionFactory

INFO: JDK 1.4+ collections available

Jun 24, 2008 9:06:34 AM org.springframework.core.CollectionFactory

INFO: Commons Collections 3.x available

Jun 24, 2008 9:06:34 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader

INFO: Loading XML bean definitions from file [C:\..\AConfig.xml]

Jun 24, 2008 9:06:34 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader

INFO: Loading XML bean definitions from file [C:\..\BConfig.xml]

Jun 24, 2008 9:06:34 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader

INFO: Loading XML bean definitions from file [C:\..\NConfig.xml]

Jun 24, 2008 9:06:34 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader

INFO: Loading XML bean definitions from file [C:\..\IConfig.xml]

Jun 24, 2008 9:06:34 AM net.sf.dozer.util.mapping.config.GlobalSettings

INFO: Trying to find Dozer configuration file: dozer.properties

Jun 24, 2008 9:06:34 AM net.sf.dozer.util.mapping.config.GlobalSettings

INFO: Using URL [file:/../dozer.properties] for Dozer global property configuration

Jun 24, 2008 9:06:34 AM net.sf.dozer.util.mapping.config.GlobalSettings

INFO: Reading Dozer properties from URL [file:/../dozer.properties]

Jun 24, 2008 9:06:35 AM net.sf.dozer.util.mapping.config.GlobalSettings

INFO: Finished configuring Dozer global properties

Jun 24, 2008 9:06:35 AM net.sf.dozer.util.mapping.DozerInitializer

INFO: Initializing Dozer.  Version: 4.1, Thread Name:Thread-0, Is this JDK 1.5.x?:false

Jun 24, 2008 9:06:35 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader

INFO: Loading XML bean definitions from file [C:\..\AConfig.xml]

Jun 24, 2008 9:06:35 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader

INFO: Loading XML bean definitions from file [C:\..\BConfig.xml]

Jun 24, 2008 9:06:35 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader

INFO: Loading XML bean definitions from file [C:\..\NConfig.xml]

Jun 24, 2008 9:06:35 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader

INFO: Loading XML bean definitions from file [C:\..\IConfig.xml]

Jun 24, 2008 9:06:36 AM com.wellpoint.waf.configuration.FileConfigProvider

INFO: Loading properties file from class path resource [framework-java.properties]

Jun 24, 2008 9:06:36 AM net.sf.dozer.util.mapping.DozerBeanMapper

INFO: Initializing a new instance of the dozer bean mapper.

Jun 24, 2008 9:06:36 AM net.sf.dozer.util.mapping.util.CustomMappingsLoader

INFO: Using the following xml files to load custom mappings for the bean mapper instance: [dozerMapping.xml]

Jun 24, 2008 9:06:36 AM net.sf.dozer.util.mapping.util.CustomMappingsLoader

INFO: Trying to find xml mapping file: dozerMapping.xml

Jun 24, 2008 9:06:36 AM net.sf.dozer.util.mapping.util.CustomMappingsLoader

INFO: Using URL [file:/../dozerMapping.xml] to load custom xml mappings

Jun 24, 2008 9:06:37 AM net.sf.dozer.util.mapping.util.CustomMappingsLoader

INFO: Successfully loaded custom xml mappings from URL: [file:/../dozerMapping.xml]

Open in new window

0
 

Author Closing Comment

by:srikanthradix
ID: 31469991
Since Spring uses commons-logging.jar i put commons-logging.properties and simplelog.properties with the properties said in http://www.oracle.com/technology/products/jdev/tips/mills/Struts-logging.html . Spring is logging only for error messages after that. i got it thanks for your time.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Eclipse Neon and jdk 1.8.0 11 138
Java and GPO 11 71
GUI builder for Eclipse? 8 27
Oracle SQL syntax check  without executing 6 37
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now