obsws-ruby/lib/obsws/logger.rb

12 lines
251 B
Ruby
Raw Normal View History

2023-07-26 14:37:35 +01:00
require "logger"
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