Rolling uphill

Discussion in 'Java' started by allancady@yahoo.com, Dec 8, 2005.

  1. Guest

    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
     
    , Dec 8, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PT
    Replies:
    0
    Views:
    4,245
  2. Brett Sheeran

    Log4j Not Rolling Files

    Brett Sheeran, Feb 9, 2004, in forum: Java
    Replies:
    1
    Views:
    7,491
    Oscar kind
    Feb 23, 2004
  3. Dharmveer Jain
    Replies:
    0
    Views:
    517
    Dharmveer Jain
    Sep 14, 2004
  4. KPB
    Replies:
    0
    Views:
    996
  5. marty

    rolling back 24 hour times

    marty, Nov 12, 2003, in forum: C Programming
    Replies:
    5
    Views:
    618
    Eric Sosman
    Nov 12, 2003
Loading...

Share This Page