• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

Turning off log stmt

Hi Experts,

I am experimenting with some of the Logging Components. When I used log.info() the log message appears console, but not for log.debug() and I am wondering why.

private Log log = LogFactory.getLog(ResultsAction.class.getName());
log.debug("ActionForward: list()");

Also is there any way that I can turn this log.info() off beside commenting out?

thx,
0
dkim18
Asked:
dkim18
  • 6
  • 5
  • 2
2 Solutions
 
CEHJCommented:
The logging levels are set in your logging file. What level is set? - it needs to be at most debug
0
 
CEHJCommented:
>>Also is there any way that I can turn this log.info() off beside commenting out?

Set the level above info
0
 
dkim18Author Commented:

I don't see anything under tomcat/logs dir.( I accidently deleted all files under tomcat/webapps/ while I was playing with a build script and I am not sure this might has something to do with this. )
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
mrigankCommented:
find for all log4j.properties file present in the system PATH.
Also look into the tomcat default directory for that file.
0
 
CEHJCommented:
>>find for all log4j.properties file present in the system PATH.

Look for that in the classpath, not path
0
 
dkim18Author Commented:
i don't see log4j.properties file in the classpath. what should I do? Is it under tomcat directory?
0
 
CEHJCommented:
It must be in the classpath or logging wouldn't work

System.out.println(System.getProperty("java.class.path"));
0
 
dkim18Author Commented:
System.out.println(System.getProperty("java.class.path")); gives me this:

C:\apache-tomcat-5.5.12\bin\bootstrap.jar

I set this in the classpath, but no log file was created.
0
 
mrigankCommented:
>> Look for that in the classpath, not path

I think it looks at the current working directory as well(not PATH).
try sysout(System.getProperty("user.dir"));

and look under that folder.
0
 
dkim18Author Commented:
System.getProperty("user.dir")) gave me this and I checked under that dir, but didn't any any log files.

C:\unzipped\eclipse-SDK-3.0-win32\eclipse
0
 
CEHJCommented:
>>I think it looks at the current working directory as well(not PATH).

If the current directory is in the classpath, yes

>>but didn't any any log files.

You're not looking for log files - you're looking for log *configuration* files. Search on

log*.properties
0
 
dkim18Author Commented:
Ok, I think I finally found it it was under old copied folder. Thanks for all your helps
0
 
CEHJCommented:
:-)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 6
  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now