mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-21 17:30:49 +00:00
use conditional assignment
This commit is contained in:
parent
7d25662191
commit
f9bf8e59e0
@ -3,7 +3,7 @@ require "logger"
|
|||||||
module Voicemeeter
|
module Voicemeeter
|
||||||
module Logging
|
module Logging
|
||||||
def logger
|
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.progname = instance_of?(::Module) ? name : self.class.name
|
||||||
@logger
|
@logger
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user