mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-22 01:40:49 +00:00
use conditional assignment
This commit is contained in:
parent
7d25662191
commit
f9bf8e59e0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user