mirror of
https://github.com/elastic/logstash.git
synced 2025-06-28 01:37:28 -04:00
Improve pipeline bootstrap error logs (#16495)
This PR adds the cause errors details on the pipeline converge state error logs
This commit is contained in:
parent
60670087cb
commit
e84fb458ce
1 changed files with 7 additions and 1 deletions
|
@ -395,7 +395,13 @@ class LogStash::Agent
|
|||
)
|
||||
end
|
||||
rescue SystemExit, Exception => e
|
||||
logger.error("Failed to execute action", :action => action, :exception => e.class.name, :message => e.message, :backtrace => e.backtrace)
|
||||
error_details = { :action => action, :exception => e.class.name, :message => e.message, :backtrace => e.backtrace }
|
||||
cause = e.cause
|
||||
if cause && e != cause
|
||||
error_details[:cause] = { :exception => cause.class, :message => cause.message }
|
||||
error_details[:cause][:backtrace] = cause.backtrace if cause.backtrace
|
||||
end
|
||||
logger.error('Failed to execute action', error_details)
|
||||
converge_result.add(action, LogStash::ConvergeResult::FailedAction.from_exception(e))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue