Module: DebugLogging::ApiClassMethods
- Defined in:
- lib/debug_logging.rb
Instance Method Summary collapse
-
#debug_config ⇒ Object
There are times when the class will need access to the configuration object, such as to override it per instance method.
-
#debug_log(message = nil, config_proxy = nil, &block) ⇒ Object
Not used by this gem internally, but provides an external interface for classes to also use this logging tool directly, with configured options like benchmarking, colors, or leg level.
Instance Method Details
#debug_config ⇒ Object
There are times when the class will need access to the configuration object,
such as to override it per instance method
112 113 114 |
# File 'lib/debug_logging.rb', line 112 def debug_config @debug_logging_configuration end |
#debug_log(message = nil, config_proxy = nil, &block) ⇒ Object
Not used by this gem internally, but provides an external interface for
classes to also use this logging tool directly,
with configured options like benchmarking, colors, or leg level.
102 103 104 105 106 107 108 |
# File 'lib/debug_logging.rb', line 102 def debug_log( = nil, config_proxy = nil, &block) # If a, instance-method-level, or class-method-level custom config is not # passed in, then fall back to the class' default config, which is a # potentially customized copy of the default config for the whole app. config_proxy ||= debug_config config_proxy.log(, &block) end |