From d1f961e802e49d3372a9228cdd0877cb05a3695f Mon Sep 17 00:00:00 2001 From: Jayamala Date: Fri, 19 Apr 2024 15:40:27 -0400 Subject: [PATCH] updated gem version and removed canister reg for logger --- Gemfile | 2 +- Gemfile.lock | 2 +- services.rb | 17 +++++------------ 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/Gemfile b/Gemfile index 7bb31a4..535188c 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gem "aws-sdk-s3", "~> 1.136" gem "bagit", "~> 0.4.6" -gem "canister" +gem "canister", "~> 0.9.2" gem "faraday", "~> 2.9" gem "faraday-retry", "~> 2.2" gem "minitar", "~> 0.9" diff --git a/Gemfile.lock b/Gemfile.lock index 7abc70b..9944fff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -63,7 +63,7 @@ PLATFORMS DEPENDENCIES aws-sdk-s3 (~> 1.136) bagit (~> 0.4.6) - canister + canister (~> 0.9.2) dotenv (~> 3.1.0) faraday (~> 2.9) faraday-retry (~> 2.2) diff --git a/services.rb b/services.rb index 048cbde..9ef2696 100644 --- a/services.rb +++ b/services.rb @@ -17,26 +17,19 @@ Config::ConfigService.database_config_from_env end - # Logger module DarkBlueLogger def self.included(klass) klass.class_exec do include SemanticLogger include SemanticLogger::Loggable - SemanticLogger[klass] - S.register(:log_stream) do - $stderr.sync = true - $stderr - end - S.register(:logger) do - if !SemanticLogger::Logger.processor.appenders.console_output? - SemanticLogger.add_appender(io: S.log_stream, formatter: :color) - SemanticLogger.default_level = Config::ConfigService.log_level_from_env - end + logger = SemanticLogger[klass] + if !SemanticLogger::Logger.processor.appenders.console_output? + SemanticLogger.add_appender(io: $stderr, formatter: :color) + SemanticLogger.default_level = Config::ConfigService.log_level_from_env end + logger end - S.logger end end