lib/semantic_logger/subscriber.rb in semantic_logger-4.8.2 vs lib/semantic_logger/subscriber.rb in semantic_logger-4.9.0
- old
+ new
@@ -20,10 +20,15 @@
# A subscriber should implement close if it can.
def close
# NOOP
end
+ # Method called to log an event
+ def log(log)
+ raise NotImplementedError
+ end
+
# Returns [SemanticLogger::Formatters::Default] default formatter for this subscriber.
def default_formatter
SemanticLogger::Formatters::Default.new
end
@@ -64,9 +69,14 @@
end
# Whether this log entry meets the criteria to be logged by this appender.
def should_log?(log)
super(log) && (log.metric_only? ? metrics? : true)
+ end
+
+ # Whether this appender is logging to stdout or stderror
+ def console_output?
+ false
end
private
# Initializer for Abstract Class SemanticLogger::Subscriber