obsws-ruby/lib/obsws/logger.rb

10 lines
233 B
Ruby
Raw Normal View History

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