mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
- add exception class in debug mode
- emit exceptions on config compile errors.
This commit is contained in:
parent
8b34a61cd3
commit
6cde55106b
2 changed files with 9 additions and 2 deletions
|
@ -22,7 +22,12 @@ class LogStash::Pipeline
|
|||
# The config code is hard to represent as a log message...
|
||||
# So just print it.
|
||||
@logger.debug? && @logger.debug("Compiled pipeline code:\n#{code}")
|
||||
eval(code)
|
||||
begin
|
||||
eval(code)
|
||||
rescue => e
|
||||
p e.backtrace[1]
|
||||
raise
|
||||
end
|
||||
|
||||
@input_to_filter = SizedQueue.new(20)
|
||||
|
||||
|
@ -149,7 +154,8 @@ class LogStash::Pipeline
|
|||
rescue => e
|
||||
if @logger.debug?
|
||||
@logger.error(I18n.t("logstash.pipeline.worker-error-debug",
|
||||
:plugin => plugin.inspect, :error => e,
|
||||
:plugin => plugin.inspect, :error => e.to_s,
|
||||
:exception => e.class,
|
||||
:stacktrace => e.backtrace.join("\n")))
|
||||
else
|
||||
@logger.error(I18n.t("logstash.pipeline.worker-error",
|
||||
|
|
|
@ -26,6 +26,7 @@ en:
|
|||
A plugin had an unrecoverable error. Will restart this plugin.
|
||||
Plugin: %{plugin}
|
||||
Error: %{error}
|
||||
Exception: %{exception}
|
||||
Stack: %{stacktrace}
|
||||
plugin-loading-error: >-
|
||||
Couldn't find any %{type} plugin named '%{name}'. Are you
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue