class SemanticLogger::Subscriber
def initialize(level: nil, formatter: nil, filter: nil, application: nil, environment: nil, host: nil,
Whether to log metric only entries with this subscriber.
metrics: [Boolean]
Default: SemanticLogger.host
Name of this host to appear in log messages.
host: [String]
Default: SemanticLogger.application
Name of this application to appear in log messages.
application: [String]
The Proc must return true or false.
Proc: Only include log messages where the supplied Proc returns true
regular expression. All other messages will be ignored.
RegExp: Only include log messages where the class name matches the supplied.
filter: [Regexp|Proc]
Default: Use the built-in formatter (See: #call)
the output from this subscriber
An instance of a class that implements #call, or a Proc to be used to format
formatter: [Object|Proc]
Override the log level for this subscriber.
level: [:trace | :debug | :info | :warn | :error | :fatal]
Parameters
Initializer for Abstract Class SemanticLogger::Subscriber
def initialize(level: nil, formatter: nil, filter: nil, application: nil, environment: nil, host: nil, metrics: false, &block) self.formatter = block || formatter @application = application @environment = environment @host = host @metrics = metrics # Subscribers don't take a class name, so use this class name if a subscriber # is logged to directly. super(self.class, level, filter) end