Skip to content

Commit

Permalink
Change errors in log to error type.
Browse files Browse the repository at this point in the history
Some error messages in log were type info.

https://bugzilla.redhat.com/show_bug.cgi?id=1383732
  • Loading branch information
billfitzgerald0120 committed Apr 24, 2017
1 parent bc925cd commit 008b70d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def check_provisioned(task, service)

unless @handle.root['ae_result'] == 'retry'
@handle.log("info", "AnsibleTower job finished. Status: #{@handle.root['ae_result']}, reason: #{@handle.root['ae_reason']}")
@handle.log("info", "Please examine job console output for more details") if @handle.root['ae_result'] == 'error'
@handle.log('error', 'Please examine job console output for more details') if @handle.root['ae_result'] == 'error'

job.refresh_ems
task.miq_request.user_message = @handle.root['ae_reason'].truncate(255) unless @handle.root['ae_reason'].blank?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def check_provisioned(task, service)

unless @handle.root['ae_result'] == 'retry'
@handle.log("info", "AnsibleTower job finished. Status: #{@handle.root['ae_result']}, reason: #{@handle.root['ae_reason']}")
@handle.log("info", "Please examine job console output for more details") if @handle.root['ae_result'] == 'error'
@handle.log('error', 'Please examine job console output for more details') if @handle.root['ae_result'] == 'error'

job.refresh_ems
task.miq_request.user_message = @handle.root['ae_reason'].truncate(255) unless @handle.root['ae_reason'].blank?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def check_state(finished, fail)
$evm.root['ae_result'] = "ok"
elsif fail
$evm.root['ae_result'] = "error"
$evm.log(:info, "********* Provision failed ************")
$evm.log(:error, '********* Provision failed ************')
else
$evm.log(:info, "********* Provision isnt finished re-trying in 1 min ************")
$evm.root['ae_result'] = 'retry'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def main
rescue => err
@handle.root['ae_result'] = 'error'
@handle.root['ae_reason'] = err.message
@handle.log("info", "Error in execute: #{err.message}")
@handle.log('error', "Error in execute: #{err.message}")
update_task(err.message)
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def main
rescue => err
@handle.root['ae_result'] = 'error'
@handle.root['ae_reason'] = err.message
@handle.log(:info, "Error in preprocess: #{err.message}")
@handle.log(:error, "Error in preprocess: #{err.message}")
update_task(err.message)
end
end
Expand Down

0 comments on commit 008b70d

Please sign in to comment.