Skip to content

Commit

Permalink
updated gem version and removed canister reg for logger
Browse files Browse the repository at this point in the history
  • Loading branch information
jayamala17 committed Apr 19, 2024
1 parent 5766d61 commit d1f961e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
17 changes: 5 additions & 12 deletions services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d1f961e

Please sign in to comment.