Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change errors in log to error type. #101

Merged
merged 1 commit into from
Apr 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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