Browse Source

Log level is uppercased

master
aeris 4 years ago
parent
commit
50b8b57065
  1. 2
      lib/cross-post.rb

2
lib/cross-post.rb

@ -11,7 +11,7 @@ OpenURI::Buffer.const_set 'StringMax', 0
class CrossPost
LOGGER = Logger.new STDERR
LOGGER.level = Logger.const_get ENV.fetch('LOG', 'INFO')
LOGGER.level = Logger.const_get ENV.fetch('LOG', 'INFO').upcase
LOGGER.formatter = proc do |severity, time, _, msg|
time = time.strftime '%Y-%m-%dT%H:%M:%S.%6N'.freeze
"#{time} #{severity} #{msg}\n"

Loading…
Cancel
Save