Module: DebugLogging
- Defined in:
- lib/debug_logging.rb,
lib/debug_logging/util.rb,
lib/debug_logging/hooks.rb,
lib/debug_logging/errors.rb,
lib/debug_logging/version.rb,
lib/debug_logging/finalize.rb,
lib/debug_logging/constants.rb,
lib/debug_logging/class_logger.rb,
lib/debug_logging/configuration.rb,
lib/debug_logging/class_notifier.rb,
lib/debug_logging/log_subscriber.rb,
lib/debug_logging/instance_logger.rb,
lib/debug_logging/argument_printer.rb,
lib/debug_logging/instance_notifier.rb,
lib/debug_logging/instance_logger_modulizer.rb,
lib/debug_logging/instance_notifier_modulizer.rb
Overview
From: stackoverflow.com/a/34559282 License: creativecommons.org/licenses/by-sa/4.0/
Defined Under Namespace
Modules: ApiClassMethods, ArgumentPrinter, ClassLogger, ClassNotifier, ConfigClassMethods, Constants, Finalize, Hooks, InstanceLoggerModulizer, InstanceNotifierModulizer, Util Classes: Configuration, Error, InstanceLogger, InstanceNotifier, LogSubscriber, NoBlockGiven, TimeoutError
Constant Summary collapse
- VERSION =
'3.1.8'
Class Attribute Summary collapse
-
.debug_logging_configuration ⇒ Object
Returns the value of attribute debug_logging_configuration.
Class Method Summary collapse
-
.configuration ⇒ Object
For single statement global config in an initializer e.g.
-
.configure {|configuration| ... } ⇒ Object
For global config in an initializer with a block.
- .extended(base) ⇒ Object
Class Attribute Details
.debug_logging_configuration ⇒ Object
Returns the value of attribute debug_logging_configuration.
112 113 114 |
# File 'lib/debug_logging.rb', line 112 def debug_logging_configuration @debug_logging_configuration end |
Class Method Details
.configuration ⇒ Object
For single statement global config in an initializer e.g. DebugLogging.configuration.ellipsis = “…”
82 83 84 |
# File 'lib/debug_logging.rb', line 82 def self.configuration self.debug_logging_configuration ||= Configuration.new end |
.configure {|configuration| ... } ⇒ Object
For global config in an initializer with a block
87 88 89 |
# File 'lib/debug_logging.rb', line 87 def self.configure yield(configuration) end |
.extended(base) ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/debug_logging.rb', line 66 def self.extended(base) base.send(:extend, ArgumentPrinter) base.send(:extend, ApiClassMethods) base.send(:extend, ConfigClassMethods) base.debug_config_reset(Configuration.new(**debug_logging_configuration.to_hash)) base.class_eval do def base.inherited(subclass) subclass.debug_config_reset(Configuration.new(**debug_config.to_hash)) end end end |