Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

log4j level

 
Ranch Hand
Posts: 128
  • 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
Ranch Hand
Posts: 128
  • 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 ?
 
Sheriff
Posts: 24654
58
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.
 
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!