module MongodbLogger::Config
Change config options in an initializer:
MongodbLogger::Base.on_log_exception do |mongo_record|
... call some code ...
end
Or in a block:
MongodbLogger::Base.configure do |config|
config.on_log_exception do |mongo_record| ... call some code ... end
end
Attributes
disabled[W]
on_log_exception[W]
Public Instance Methods
configure() { |self| ... }
click to toggle source
# File lib/mongodb_logger/config.rb, line 20 def configure yield self end
disabled()
click to toggle source
# File lib/mongodb_logger/config.rb, line 32 def disabled @disabled ||= false end
on_log_exception(*args, &block)
click to toggle source
# File lib/mongodb_logger/config.rb, line 24 def on_log_exception(*args, &block) if block @on_log_exception = block elsif @on_log_exception @on_log_exception.call(*args) end end