Skip to content
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

Make sure log events generated at shutdown phase of plugins (except #1625

Merged
merged 1 commit into from
Jul 12, 2017

Conversation

mururu
Copy link
Member

@mururu mururu commented Jul 12, 2017

corresponding filter and output) are emitted

Here is an example. In this case, out-ok-1, in-ok, filter-ok and out-ok-2 should be captured. filter-ng and out-ng should not be captured because they match fluentd's event logs. Note that the captured logs appear twice due to stdout filter.

<match test>
  @type null
  @id out-ok-1
</match>

<source>
  @type dummy
  tag dummy
  @id in-ok
</source>

<filter test>
  @type stdout
  @id filter-ok
</filter>

<label @X>
  <match hoge>
    @type null
    @id out-ok-2
  </match>
</label>

<filter fluent.**>
  @type stdout
  @id filter-ng
</filter>

<match fluent.**>
  @type stdout
  @id out-ng
</match>
2017-07-12 19:25:28 +0900 [info]: shutting down fluentd
2017-07-12 19:25:28 +0900 [info]: shutting down input type="dummy" plugin_id="in-ok"
2017-07-12 19:25:29 +0900 fluent.info: {"message":"shutting down fluentd"}
2017-07-12 19:25:28 +0900 fluent.info: {"message":"shutting down fluentd"}
2017-07-12 19:25:29 +0900 fluent.info: {"type":"dummy","plugin_id":"in-ok","message":"shutting down input type=\"dummy\" plugin_id=\"in-ok\""}
2017-07-12 19:25:28 +0900 fluent.info: {"type":"dummy","plugin_id":"in-ok","message":"shutting down input type=\"dummy\" plugin_id=\"in-ok\""}
2017-07-12 19:25:29 +0900 [warn]: no patterns matched tag="dummy"
2017-07-12 19:25:29 +0900 [info]: shutting down output in @X type="null" plugin_id="out-ok-2"
2017-07-12 19:25:29 +0900 [info]: shutting down filter type="stdout" plugin_id="filter-ok"
2017-07-12 19:25:29 +0900 [info]: shutting down output type="null" plugin_id="out-ok-1"
2017-07-12 19:25:29 +0900 fluent.warn: {"tag":"dummy","message":"no patterns matched tag=\"dummy\""}
2017-07-12 19:25:29 +0900 fluent.warn: {"tag":"dummy","message":"no patterns matched tag=\"dummy\""}
2017-07-12 19:25:29 +0900 fluent.info: {"type":"null","plugin_id":"out-ok-2","message":"shutting down output in @X type=\"null\" plugin_id=\"out-ok-2\""}
2017-07-12 19:25:29 +0900 fluent.info: {"type":"null","plugin_id":"out-ok-2","message":"shutting down output in @X type=\"null\" plugin_id=\"out-ok-2\""}
2017-07-12 19:25:29 +0900 fluent.info: {"type":"stdout","plugin_id":"filter-ok","message":"shutting down filter type=\"stdout\" plugin_id=\"filter-ok\""}
2017-07-12 19:25:29 +0900 fluent.info: {"type":"stdout","plugin_id":"filter-ok","message":"shutting down filter type=\"stdout\" plugin_id=\"filter-ok\""}
2017-07-12 19:25:29 +0900 fluent.info: {"type":"null","plugin_id":"out-ok-1","message":"shutting down output type=\"null\" plugin_id=\"out-ok-1\""}
2017-07-12 19:25:29 +0900 fluent.info: {"type":"null","plugin_id":"out-ok-1","message":"shutting down output type=\"null\" plugin_id=\"out-ok-1\""}
2017-07-12 19:25:29 +0900 [info]: shutting down filter type="stdout" plugin_id="filter-ng"
2017-07-12 19:25:29 +0900 [info]: shutting down output type="stdout" plugin_id="out-ng"
2017-07-12 19:25:29 +0900 [info]: process finished code=0

corresponding filter and output) are emitted
@repeatedly
Copy link
Member

LGTM

@repeatedly repeatedly merged commit 8d773b7 into fluent:v0.12 Jul 12, 2017
@mururu mururu deleted the capture-more-log-events branch July 12, 2017 14:53
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