From 193bb1f2766962a47463e67416d22683f25ce6ad Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 25 Feb 2019 18:42:42 -0800 Subject: [PATCH] Use Dexter for the logger --- src/web_app_skeleton/config/logger.cr | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/web_app_skeleton/config/logger.cr b/src/web_app_skeleton/config/logger.cr index 4b0ce290..ef8aaff1 100644 --- a/src/web_app_skeleton/config/logger.cr +++ b/src/web_app_skeleton/config/logger.cr @@ -5,34 +5,30 @@ logger = # Logs to `tmp/test.log` so you can see what's happening without having # a bunch of log output in your specs results. FileUtils.mkdir("tmp") - Lucky::Logger.new( + Dexter::Logger.new( io: File.new("tmp/test.log", mode: "w"), level: Logger::Severity::DEBUG, - log_formatter: Lucky::PrettyLogFormatter.new + log_formatter: Lucky::PrettyLogFormatter ) elsif Lucky::Env.production? # This sets the log formatter to JSON so you can parse the logs with # services like Logentries or Logstash. # # If you want logs like in develpoment use `Lucky::PrettyLogFormatter`. - Lucky::Logger.new( + Dexter::Logger.new( io: STDOUT, level: Logger::Severity::INFO, - log_formatter: Lucky::JsonLogFormatter.new + log_formatter: Dexter::Formatters::JsonLogFormatter ) else - # For development, log everything to STDOUT with the pretty formatter - Lucky::Logger.new( + # For development, log everything to STDOUT with the pretty formatter. + Dexter::Logger.new( io: STDOUT, level: Logger::Severity::DEBUG, - log_formatter: Lucky::PrettyLogFormatter.new + log_formatter: Lucky::PrettyLogFormatter ) end Lucky.configure do |settings| settings.logger = logger end - -Lucky::LogHandler.configure do |settings| - settings.logger = logger -end