Module: Docker::Registry::Sync::STDLogger
- Defined in:
- lib/docker/registry/sync/configuration.rb
Class Method Summary collapse
- .debug(msg) ⇒ Object
- .do_log?(requested_lvl, curr_lvl) ⇒ Boolean
- .error(msg) ⇒ Object
- .info(msg) ⇒ Object
Class Method Details
.debug(msg) ⇒ Object
32 33 34 35 36 37 |
# File 'lib/docker/registry/sync/configuration.rb', line 32 def debug(msg) if do_log?(:debug, Docker::Registry::Sync.config.log_level) STDOUT.puts "[DEBUG] #{msg}" STDOUT.flush end end |
.do_log?(requested_lvl, curr_lvl) ⇒ Boolean
26 27 28 29 30 |
# File 'lib/docker/registry/sync/configuration.rb', line 26 def do_log?(requested_lvl, curr_lvl) curr_lvl = Docker::Registry::Sync::STDLogLvl.send(curr_lvl.to_sym) requested_lvl = Docker::Registry::Sync::STDLogLvl.send(requested_lvl.to_sym) requested_lvl >= curr_lvl end |