Fix logging
This commit is contained in:
parent
b609549659
commit
6432296391
|
|
@ -53,8 +53,8 @@ class MatchesController < ApplicationController
|
|||
handle_match_end if new_state == 'finished'
|
||||
if @match.group_match? and new_state == "in_progress"
|
||||
group = @match.group
|
||||
if UpdateGroupsGroupScoresAndSave.call(group: group).success?
|
||||
Rails.logger.warn "Updating groups group score failed for #{group}"
|
||||
unless UpdateGroupsGroupScoresAndSave.call(group: group).success?
|
||||
logger.warn "Updating groups group score failed for #{group}"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ class MatchesController < ApplicationController
|
|||
if @match.group_match?
|
||||
group = @match.group
|
||||
unless UpdateGroupsGroupScoresAndSave.call(group: group).success?
|
||||
Rails.logger.warn "Updating groups group score failed for #{group}"
|
||||
logger.warn "Updating groups group score failed for #{group}"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -50,5 +50,8 @@ module TurniereBackend
|
|||
|
||||
# Active Record
|
||||
config.active_record.legacy_connection_handling = false
|
||||
|
||||
# Logging
|
||||
config.logger = Logger.new(STDOUT)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,6 +5,3 @@ require_relative 'application'
|
|||
|
||||
# Initialize the Rails application.
|
||||
Rails.application.initialize!
|
||||
|
||||
Rails.logger = Logger.new(STDOUT)
|
||||
config.logger = ActiveSupport::Logger.new("log/#{Rails.env}.log")
|
||||
|
|
|
|||
Loading…
Reference in New Issue