lib/semantic_logger/appender/mongodb.rb in semantic_logger-4.2.2 vs lib/semantic_logger/appender/mongodb.rb in semantic_logger-4.3.0
- old
+ new
@@ -101,12 +101,17 @@
# Default: SemanticLogger.host
#
# application: [String]
# Name of this application to appear in log messages.
# Default: SemanticLogger.application
- def initialize(uri:, collection_name: 'semantic_logger', write_concern: 0, collection_size: 1024 ** 3, collection_max: nil,
- level: nil, formatter: nil, filter: nil, host: nil, application: nil, &block)
+ def initialize(uri:,
+ collection_name: 'semantic_logger',
+ write_concern: 0,
+ collection_size: 1024 ** 3,
+ collection_max: nil,
+ **args,
+ &block)
@client = Mongo::Client.new(uri, logger: logger)
@collection_name = collection_name
@options = {
capped: true,
@@ -118,10 +123,10 @@
reopen
# Create the collection and necessary indexes
create_indexes
- super(level: level, formatter: formatter, filter: filter, application: application, host: host, &block)
+ super(**args, &block)
end
# After forking an active process call #reopen to re-open
# open the handles to resources
def reopen