Module: Grape::DSL::Logger
Instance Attribute Summary collapse
-
#logger(logger = nil) ⇒ Object
Set or retrive the configured logger.
Attributes included from Settings
#inheritable_setting, #top_level_setting
Method Summary
Methods included from Settings
#api_class_setting, #get_or_set, #global_setting, #namespace_end, #namespace_inheritable, #namespace_inheritable_to_nil, #namespace_reverse_stackable, #namespace_reverse_stackable_with_hash, #namespace_setting, #namespace_stackable, #namespace_stackable_with_hash, #namespace_start, #route_end, #route_setting, #unset, #unset_api_class_setting, #unset_global_setting, #unset_namespace_inheritable, #unset_namespace_setting, #unset_namespace_stackable, #unset_route_setting, #within_namespace
Instance Attribute Details
#logger(logger = nil) ⇒ Object
Set or retrive the configured logger. If none was configured, this method will create a new one, logging to stdout.
13 14 15 16 17 18 19 |
# File 'lib/grape/dsl/logger.rb', line 13 def logger(logger = nil) if logger global_setting(:logger, logger) else global_setting(:logger) || global_setting(:logger, ::Logger.new($stdout)) end end |