• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java logging -vs- log4j  RSS feed

 
Lawrence Gatson
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm attempting to implement logging with Java 1.6; my past experience has been with Apache's Log4j.

Statement: Log4j allow's for a "rolling log file" created on a daily basis.
Questions: Does java logging also provide this capability (i.e. rolling to a new log file at midnight)? If it does, might you have a code example that I can look at?


Thanks!
 
Rob Spoor
Sheriff
Posts: 21131
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know, java.util.logging does not have such a handler. That doesn't stop you from writing one (perhaps based on FileHandler), but I'd go (and usually I do go) for Log4J.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!