Welcome to the Linux Foundation Forum!

Does the code sequence matter inside the directive or between directives?

Is there a difference between the code sequence inside the directives as well as the order of directive in match or source?

e.g., does the order of these codes matter?

  1. <source>
  2. @type tail
  3. path /tmp/fluent/*.log
  4. tag local.logs
  5. pos_file /tmp/fluent/lab2.tail.pos
  6. <parse>
  7. @type none
  8. </parse>
  9. </source>

versus

  1. <source>
  2. @type tail
  3. path /tmp/fluent/*.log
  4. <parse>
  5. @type none
  6. </parse>
  7. tag local.logs
  8. pos_file /tmp/fluent/lab2.tail.pos
  9. </source>

Comments

  • edited May 2022

    Within directives, no. As long as the required keys and values are present and well-formed, they will work identically.

    Order of directives (like in cases with multiple <match> directives) is what matters. The first directive that an event qualifies for will take that event out of the pipeline.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training