Provide an optional signal handler to change the log level at runtime #30

Closed
davetron5000 opened this Issue Feb 19, 2012 · 2 comments

Comments

Projects
None yet
2 participants
Owner

davetron5000 commented Feb 19, 2012

It would be handy to be able to change the log level to debug at runtime, without restarting the app, and then to change it back. Something like:

use_log_level_option :change_at_runtime => true

or, perhaps:

use_log_level_option :change_at_runtime => 'USR1'

this would enable something like:

trap(signal) do 
  logger.level = Logger::DEBUG
end

@sch0rsch sch0rsch added a commit to sch0rsch/methadone that referenced this issue Aug 20, 2014

@sch0rsch sch0rsch allow changing the log level at runtime
Install a signal handler when passing :change_at_runtime => <SIG>
to use_log_level_option to signal <SIG> and toggle the log level
when receiving this signal.

Implements #30
a7644f0
Contributor

sch0rsch commented Aug 24, 2014

This issue can be closed. This feature is part of 1.7.0

Owner

davetron5000 commented Aug 24, 2014

Ah, yes! This is available now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment