MultilineCodec

class performance.driver.classes.observer.logstax.codecs.MultilineCodec(config)[source]

The multi-line codec is able to collect more than one matching lines into a single message.

observers:
  - class: observer.LogstaxObserver
    filters:

      - codec:
          class: logstax.codecs.MultlineCodec

          # The multiple lines to match, as one regex rule per line
          lines:

            # Match the given regex on the line
            - match: .*

              # [Optional] Set to `yes` to ignore case
              ignorecase: yes

              # [Optional] Set to `yes` to repeat indefinitely or
              # to a number to repeat up to the given number of times
              repeat: 4

              # [Optional] Set to `yet` to make this rule optional
              optional: no

            # Example: Match the given regex on the next line
            # repeat this pattern 2 times
            - match: .*
              repeat: 2

            # Example: Optionally match this regex on the next line
            - match: .*
              optional: yes

            # Example: Match the given regex until it stops matching
            - match: .*
              repeat: yes

          # [Optional] Set to `yes` to accept incomplete multiline matches
          acceptIncomplete: no

          # [Optional] Set to the new-line character you want to use when joining
          newline: ";""

For example, to join together lines that start with “::” you can use:

...
lines:
  - match: "^::.*$"
    repeat: yes

Or, to join together lines that open a bracket and close it on another line:

...
lines:
  - match: "^.*{$"
  - match: "^.*[^}]$"
    repeat: yes

SingleLineCodec

class performance.driver.classes.observer.logstax.codecs.SingleLineCodec(config)[source]

The simple line codec is forwarding the line received as-is.

observers:
  - class: observer.LogstaxObserver
    filters:

      - codec:
          class: logstax.codecs.SingleLineCodec