log4r icon indicating copy to clipboard operation
log4r copied to clipboard

log4r does not support reconfiguring during runtime

Open thatsnotright opened this issue 10 years ago • 2 comments

I see this noted in the test README, but it is affecting my tests as well. Running in jruby incurs a higher startup cost so I'd rather not have to create a new jruby instance for every test which initializes log4r.

Is there any strategy others have adopted for re-configuring log4r during runtime? I mean a full recreate of the loggers and outputters.

thatsnotright avatar May 19 '14 20:05 thatsnotright

Just to clarify: do you want to have the object instances to be fully recreated? Are you trying to recreating the objects using a new instance of the classes?

colbygk avatar May 30 '14 02:05 colbygk

I want to be able to reconfigure log4r when the yml config file is changed. log4j has a feature like this and if you use PropertyConfigurator.configureAndWatch it works nicely, and I'd like it in Ruby too.

When I looked in to the code it wasn't obvious to me that it could be reconfigured. I'll try to hack on that and submit a pull request.

thatsnotright avatar May 30 '14 20:05 thatsnotright