obsws-ruby/lib/obsws/logger.rb

12 lines
249 B
Ruby
Raw Normal View History

2023-07-26 14:37:35 +01:00
require "logger"
module OBSWS
module Logging
def logger
@logger = Logger.new($stdout, level: ENV.fetch("OBSWS_LOG_LEVEL", "WARN"))
@logger.progname = instance_of?(::Module) ? name : self.class.name
@logger
end
end
end