From c4dd8ab636b25b0ec381d49d5b51df94991cb9d8 Mon Sep 17 00:00:00 2001 From: Magnus Landerblom Date: Thu, 10 Oct 2024 12:03:14 +0200 Subject: [PATCH] logs fix --- src/lavinmq/config.cr | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lavinmq/config.cr b/src/lavinmq/config.cr index 1631037e35..5870a71198 100644 --- a/src/lavinmq/config.cr +++ b/src/lavinmq/config.cr @@ -8,12 +8,12 @@ require "./in_memory_backend" module LavinMQ class Config - DEFAULT_LOG_LEVEL = Log::Severity::Info + DEFAULT_LOG_LEVEL = ::Log::Severity::Info property data_dir : String = ENV.fetch("STATE_DIRECTORY", "/var/lib/lavinmq") property config_file = File.exists?(File.join(ENV.fetch("CONFIGURATION_DIRECTORY", "/etc/lavinmq"), "lavinmq.ini")) ? File.join(ENV.fetch("CONFIGURATION_DIRECTORY", "/etc/lavinmq"), "lavinmq.ini") : "" property log_file : String? = nil - property log_level : Log::Severity = DEFAULT_LOG_LEVEL + property log_level : ::Log::Severity = DEFAULT_LOG_LEVEL property amqp_bind = "127.0.0.1" property amqp_port = 5672 property amqps_port = -1 @@ -109,12 +109,12 @@ module LavinMQ p.on("--ciphers CIPHERS", "List of TLS ciphers to allow") { |v| @tls_ciphers = v } p.on("--tls-min-version=VERSION", "Mininum allowed TLS version (default 1.2)") { |v| @tls_min_version = v } p.on("-l", "--log-level=LEVEL", "Log level (Default: info)") do |v| - level = Log::Severity.parse?(v.to_s) + level = ::Log::Severity.parse?(v.to_s) @log_level = level if level end p.on("--raise-gc-warn", "Raise on GC warnings") { @raise_gc_warn = true } p.on("--no-data-dir-lock", "Don't put a file lock in the data directory (default true)") { @data_dir_lock = false } - p.on("-d", "--debug", "Verbose logging") { @log_level = Log::Severity::Debug } + p.on("-d", "--debug", "Verbose logging") { @log_level = ::Log::Severity::Debug } p.on("-h", "--help", "Show this help") { puts p; exit 1 } p.on("-v", "--version", "Show version") { puts LavinMQ::VERSION; exit 0 } p.on("--build-info", "Show build information") { puts LavinMQ::BUILD_INFO; exit 0 } @@ -211,7 +211,7 @@ module LavinMQ case config when "data_dir" then @data_dir = v when "data_dir_lock" then @data_dir_lock = true?(v) - when "log_level" then @log_level = Log::Severity.parse(v) + when "log_level" then @log_level = ::Log::Severity.parse(v) when "log_file" then @log_file = v when "stats_interval" then @stats_interval = v.to_i32 when "stats_log_size" then @stats_log_size = v.to_i32