Rolling uphill

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top