DailyRollingFileHandler ---- Files should be rotated on a daily basis
Posted
by nag
on Stack Overflow
See other posts from Stack Overflow
or by nag
Published on 2010-03-18T04:20:13Z
Indexed on
2010/03/18
4:21 UTC
Read the original article
Hit count: 291
We have a requirment which requires to have an Handler that is extended from Java logging and allows to have the files rotated on daily basis.
Currently Java util logging do have the support of rotation based on file size by using File Handler. It doesnt support rotation on daily basis. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6350749
Mentioned handler seems is not promising .http://www.x4juli.org/api/org/x4juli/handlers/RollingFileHandler.html
So , what we are looking is for such an appender that allows daily rotation . We would like to write such handler and which is the appropriate handler to extend for ... StreamHandler or FileHandler ? And other questions are , is there way we can configure 2 different files for a single handler say FileHandler say for eg , we would like some kind of messages need to be captured in one file and other messages in other file.
Would appreciate for any comments.
© Stack Overflow or respective owner