Sha256: 4ea3c02d7c25f548acfb79a4f775a3b251f32e1d5238ba54cf63c4d267996b00
Contents?: true
Size: 626 Bytes
Versions: 18
Compression:
Stored size: 626 Bytes
Contents
module MongodbLogger # 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 module Config attr_accessor :on_log_exception def configure yield self end def on_log_exception(*args, &block) if block @on_log_exception = block elsif @on_log_exception @on_log_exception.call(*args) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems