1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-16 11:43:21 +03:00
mobile-nixos/boot/init/lib/logger.rb
2020-02-03 16:19:10 -05:00

14 lines
321 B
Ruby

LOG_LEVEL = Logger::INFO
if Configuration["log"]
level = Configuration["log"]["level"]
if level
LOG_LEVEL = Logger.const_get(level.to_sym)
end
end
$logger = Logger.new(STDOUT, level: LOG_LEVEL)
$logger.debug("Logger initialized... (#{LOG_LEVEL})")
def log(*args, level: :info)
$logger.send(level, *args)
end