This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log4j level

 
Linwood Hayes
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my setting in the log4j.properties file

*******
log4j.debug=true

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 ?
 
Linwood Hayes
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

log4j.appender.ForecastBook.DatePattern='.'yyyy-MM-dd-HH-mm

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
Sheriff
Posts: 21136
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic