Re: Renaming log file
Currently my log files are generated with a date stamp because I am using the Daily Rolling File Appender My requirement is that I want my log files without the date stamp, instead I want them as filename.log.1, filename.log.2, etc. as a sequence of numbers. You said Rolling File Appender would solve my problem. Could you be kind enough to show me how with an example? I am rather new to log4j. carnold-3 wrote: On Jan 28, 2008, at 6:47 AM, James A. N. Stauffer wrote: I'm not sure what you want but RollingFileAppender will make files like what you want. If you do need to write custom code, I would recommend writing a custom RollingPolicy for the org.apache.log4j.rolling.RollingFileAppender (o.a.l.r.RFA) in the extras companion (http://logging.apache.org/companions/extras). The o.a.l.r.RFA was designed to support pluggable RollingPolicies which provide the strategy for renaming files and TriggeringPolicies which provide the strategy for determining when to trigger files. It seems like you might just want to mix the FixedWindowRollingPolicy (which provides .1, .2, etc file names) with a TimeBasedTriggeringPolicy. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Renaming-log-file-tp15128382p15183091.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Renaming log file
I'm not sure what you want but RollingFileAppender will make files like what you want. On Jan 27, 2008 10:52 PM, anoobthomas [EMAIL PROTECTED] wrote: Currently I am using Daily Rolling File Appender to generate log files. I want to rename my log file from ABC.log2008-1-27 to ABC.log number sequence , like ABC.log1,ABC.log2 and so on. Should I create a custom appender or are there any appenders that generate this format. If I have to create a custom appender please let me know how to do it. -- View this message in context: http://www.nabble.com/Renaming-log-file-tp15128382p15128382.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- James A. N. Staufferhttp://www.geocities.com/stauffer_james/ Are you good? Take the test at http://www.livingwaters.com/good/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Renaming log file
On Jan 28, 2008, at 6:47 AM, James A. N. Stauffer wrote: I'm not sure what you want but RollingFileAppender will make files like what you want. If you do need to write custom code, I would recommend writing a custom RollingPolicy for the org.apache.log4j.rolling.RollingFileAppender (o.a.l.r.RFA) in the extras companion (http://logging.apache.org/companions/extras). The o.a.l.r.RFA was designed to support pluggable RollingPolicies which provide the strategy for renaming files and TriggeringPolicies which provide the strategy for determining when to trigger files. It seems like you might just want to mix the FixedWindowRollingPolicy (which provides .1, .2, etc file names) with a TimeBasedTriggeringPolicy. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Renaming log file
Currently I am using Daily Rolling File Appender to generate log files. I want to rename my log file from ABC.log2008-1-27 to ABC.log number sequence , like ABC.log1,ABC.log2 and so on. Should I create a custom appender or are there any appenders that generate this format. If I have to create a custom appender please let me know how to do it. -- View this message in context: http://www.nabble.com/Renaming-log-file-tp15128382p15128382.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]