• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Cannot suppress INFO log using log4J  RSS feed

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a J2EE project using LOG4J running on IBM WebSphere Server (WAS). I don't understand why I can't disable the INFO log by defining the log priority as WARN for a package. Shown below is the snippet of my log4j.properties:

# The INFO log in Java classes in package com.testing should be suppressed
log4j.logger.com.testing=warn

and I use the followings to define the logger:

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

Log log = LogFactory.getLog(Test.class);

log.info("This is INFO"); // it should be suppressed
log.warn("This is WARNING"); // it can be shown

When I run the Java class in WAS, the INFO log still appear. However, the INFO log didn't show up when I run it as ordinary Java Application.

What's wrong?
 
Proudly marching to the beat of a different kettle of fish... while reading this tiny ad
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!