From d1724827d949a65a12c4c5ff8b02e59aac21e289 Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Tue, 30 Jan 2024 21:57:53 +0100 Subject: [PATCH] Reuse exisint logger to log start banner instead of puts method (#304) Lower log level too so the message is logged --- bin/prometheus_exporter | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/prometheus_exporter b/bin/prometheus_exporter index dd6f76b2..b98ea260 100755 --- a/bin/prometheus_exporter +++ b/bin/prometheus_exporter @@ -74,7 +74,7 @@ def run end.parse! logger = Logger.new(options[:logger_path]) - logger.level = Logger::WARN + logger.level = Logger::INFO if options.has_key?(:realm) && !options.has_key?(:auth) logger.warn "Providing REALM without AUTH has no effect" @@ -121,7 +121,7 @@ def run runner = PrometheusExporter::Server::Runner.new(options) - puts "#{Time.now} Starting prometheus exporter on #{runner.bind}:#{runner.port}" + logger.info "Starting prometheus exporter on #{runner.bind}:#{runner.port}" runner.start sleep end