diff --git a/lib/voicemeeter/logger.rb b/lib/voicemeeter/logger.rb index dce0e10..892f5c4 100644 --- a/lib/voicemeeter/logger.rb +++ b/lib/voicemeeter/logger.rb @@ -3,7 +3,7 @@ require "logger" module Voicemeeter module Logging def logger - @logger = Logger.new($stdout, level: ENV.fetch("VM_LOG_LEVEL", "WARN")) + @logger ||= Logger.new($stdout, level: ENV.fetch("VM_LOG_LEVEL", "WARN")) @logger.progname = instance_of?(::Module) ? name : self.class.name @logger end