lib/dropcaster/log_formatter.rb in dropcaster-0.0.8 vs lib/dropcaster/log_formatter.rb in dropcaster-1.0.0
- old
+ new
@@ -1,7 +1,17 @@
+# frozen_string_literal: true
+
require 'logger'
module Dropcaster
+ module Logging
+ attr_writer :logger
+
+ def logger
+ @logger ||= NullLogger.new
+ end
+ end
+
class LogFormatter < Logger::Formatter
def call(severity, time, program_name, message)
"#{severity}: #{message}\n"
end
end