Menu

#24 RollingFileAppender Behaviour with positive CountDirection

open-wont-fix
None
5
2003-01-25
2003-01-24
Anonymous
No

BasicConfigurator does not call activeOptions() on
added appenders, therefore RollingFileAppender does
not work as expected with regard to pre-existing log
files. When configured from a config file,
DomConfigurator does call activeOptions() and
RollingFileAppender works as expected (that is,
initializes itself by scanning the hard drive for files
matching the log naming filespec within the defined
number range for backup versions). If one calls
activeOptions() in code after adding the appender in
code, it also works as expected.

Shouldn't BasicConfigurator call activeOptions() on its
added appenders? Or is this by design?

Thanks for considering this.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    That is, activateOptions().

     
  • Nicko Cadell

    Nicko Cadell - 2003-01-25

    Logged In: YES
    user_id=278872

    The current design requires you to call ActivateOptions() on
    the appender (if it supports it) when adding appenders
    programatically.

     
  • Nicko Cadell

    Nicko Cadell - 2003-01-25
    • assigned_to: nobody --> ncadell
    • status: open --> open-wont-fix
     
  • Nobody/Anonymous

    Logged In: NO

    Thank you very much for considering this topic.
    It was not apparent from the documentation I have found so
    far that ActivateOptions() needed to be called when
    programatically adding appenders.

     
  • Nicko Cadell

    Nicko Cadell - 2003-01-27

    Logged In: YES
    user_id=278872

    I will update the documentation for IAppender to include this
    information in the next release.
    Thanks,
    Nicko

     
  • Nobody/Anonymous

    Logged In: NO

    Thanks very much!
    I am sure that documentation and example code for using
    ActivateOptions() with the BasicConfigurator will be very
    helpful. Great tool. It's nice to see the open-source process
    at work.

     

Log in to post a comment.