Skip to content

Commit

Permalink
Merge pull request #101 from billfitzgerald0120/log_cleanup1
Browse files Browse the repository at this point in the history
Change errors in log to error type.
  • Loading branch information
gmcculloug committed Apr 26, 2017
2 parents cd7d6db + 008b70d commit 4bf5377
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 4bf5377

Please sign in to comment.