A
allancady
It's been a while since I scoured the net looking for this... maybe
someone can point me to a solution that already exists.
Both Log4j and Java's native logging API assume that everyone is
satisfied with the log rolling scheme where every time you roll, you
rename every single file in the log directory, incrementing each file's
index by one, and always writing new output into the file at index
zero. I'm sure this makes perfect sense for many, maybe most,
applications, but for me it's a royal pain.
So... has anyone come up with an appender, preferably for the Java
native API (because that's what the app I'm working with uses) that
rolls the files by creating a new file with the next higher index, and
leaving the older files names alone?
I believe if the app used Log4j, my solution would be to write my own
appender. Maybe with the Java API I'm supposed to subclass
RollingFileAppender or something like that. But I was hoping maybe
someone had already done this for me.
Thanks,
Allan
someone can point me to a solution that already exists.
Both Log4j and Java's native logging API assume that everyone is
satisfied with the log rolling scheme where every time you roll, you
rename every single file in the log directory, incrementing each file's
index by one, and always writing new output into the file at index
zero. I'm sure this makes perfect sense for many, maybe most,
applications, but for me it's a royal pain.
So... has anyone come up with an appender, preferably for the Java
native API (because that's what the app I'm working with uses) that
rolls the files by creating a new file with the next higher index, and
leaving the older files names alone?
I believe if the app used Log4j, my solution would be to write my own
appender. Maybe with the Java API I'm supposed to subclass
RollingFileAppender or something like that. But I was hoping maybe
someone had already done this for me.
Thanks,
Allan