Skip to content

Commit

Permalink
Merge pull request #16550 from nimrodshn/allow_full_error_log
Browse files Browse the repository at this point in the history
Allow full error log
(cherry picked from commit 0e33d1d)

https://bugzilla.redhat.com/show_bug.cgi?id=1530645
  • Loading branch information
jrafanie authored and simaishi committed Jan 3, 2018
1 parent c0d07f2 commit f50d518
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/models/authentication.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def validation_successful
def validation_failed(status = :unreachable, message = nil)
message ||= ERRORS[status]
_log.warn("[#{resource_type}] [#{resource_id}], previously valid on: #{last_valid_on}, previous status: [#{self.status}]")
update_attributes(:status => status.to_s.capitalize, :status_details => message.to_s, :last_invalid_on => Time.now.utc)
update_attributes(:status => status.to_s.capitalize, :status_details => message.to_s.truncate(200), :last_invalid_on => Time.now.utc)
raise_event(status, message)
end

Expand Down
6 changes: 3 additions & 3 deletions app/models/mixins/authentication_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def authentication_check(*args)
status == :valid ? auth.validation_successful : auth.validation_failed(status, details)
end

return status == :valid, details
return status == :valid, details.truncate(20_000)
end

def default_authentication
Expand All @@ -360,9 +360,9 @@ def authentication_check_no_validation(type, options)
end
end

details &&= details.to_s.truncate(200)
details &&= details.to_s

_log.warn("#{header} Validation failed: #{status}, #{details}") unless status == :valid
_log.warn("#{header} Validation failed: #{status}, #{details.truncate(200)}") unless status == :valid
return status, details
end

Expand Down

0 comments on commit f50d518

Please sign in to comment.