-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Register Fluent::Plugin::RegexpParser as parser plugin #1094
Conversation
We can use Fluent::Plugin::RegexpParser as following: ``` <parse> @type regexp expression /pattern.+/ </parse> ```
I want to use We can write configuration as following, after merged this PR. <source>
@type tail
<parse>
@type regexp
expression /pattern/
</parse>
</source> We can use @parser = parser_create(type: "regexp", conf: {"expression" => "/pattern/"}) |
Good fix. But don't use Compat modules in v0.14 module Fluent::Plugin
class NginxParser < RegexpParser
Fluent::Plugin.register_parser('nginx', self)
config_set_default :expression, "....."
end
end |
I've pushed changes using |
Are there any specific problems for parser_multiline.rb to be solved? |
For now, |
…r::RegexpParser Set options via Fluent::Config::Element.
I've added new |
|
||
class ApacheErrorParserTest < ::Test::Unit::TestCase | ||
def setup | ||
Fluent::Test.setup | ||
@parser = Fluent::Test::Driver::Parser.new(Fluent::Plugin.new_parser('apache_error')) | ||
@parser = Fluent::Test::Driver::Parser.new(Fluent::Plugin::ApacheErrorParser.new) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This instance is not parser, but test driver instance. I know it's too late to notify about it, but I want not to leave it as-is because it's misleading for following developers.
@okkez Could you fix it?
I added comments only for test code (and it originally came from other changes). |
I've fixed and pushed. |
Thank you! I'll merge this later. |
No description provided.