jQuery in Action, 3rd edition
The moose likes Other Open Source Projects and the fly likes log4j level Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "log4j level" Watch "log4j level" New topic

log4j level

Ian Shieh

Joined: Feb 04, 2010
Posts: 7
Here is my setting in the log4j.properties file


log4j.rootLogger=DEBUG, T

log4j.appender.T= org.apache.log4j.DailyRollingFileAppender

In my java code, I have

logger.info("record some information");


I don't see any of these log info be in the log file. Is there anything wrong on my setting ?
Ian Shieh

Joined: Feb 04, 2010
Posts: 7
I think I have gotten it straight. it is working fine. However, I observed on thing and want to confirm here ----

I tested and used


It is supposed to generate a new log file every minute. But actually I found if there is not any new logging event, then it does not generate a new file in the format of "xxx.2010-03-16-xx-xx". Such timestamped file is only generated if there is any new logging event. For example, if there is no event from 12:00 to 12:15 then no log files created. But at 12:16 if a new logging event occurs, then it created a new log file created. Is this correct ?
Paul Clapham

Joined: Oct 14, 2005
Posts: 19739

If you're asking whether it will generate an empty logging file for a minute if no logging events occurred during that minute, the answer is no.
I agree. Here's the link: http://aspose.com/file-tools
subject: log4j level
It's not a secret anymore!