Skip to content

Add log failed expression #35

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ferbar
Copy link

@ferbar ferbar commented May 24, 2018

If an expression failes in expand() a backtrace to expand is logged in fluentd.log. This patch loggs the failed expression as well.

begin
record[k] = v.expand(tag, time, record, tag_parts)
rescue
$log.error("filter_record_modifier::filter - exception in expression: '#{v.getcode}'")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conf.elements.select { |element| element.name == 'record' }.each do |element|

config's record elements has original code so we don't need to store code in DynamicExpander.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants