ANSI Stripper Transform

The Vector ansi_stripper transform accepts and outputs log events, allowing you to strips ANSI escape sequences from the specified field.


type = "ansi_stripper" # required
inputs = ["my-source-or-transform-id"] # required
field = "message" # optional, default
  • stringcommonoptional


    The target field to strip ANSI escape sequences from. See Field Notation Syntax for more info.

    • Default: "message"
    • View examples

How It Works

Complex Processing

If you encounter limitations with the ansi_stripper transform then we recommend using a runtime transform. These transforms are designed for complex processing and give you the power of full programming runtime.

Environment Variables

Environment variables are supported through all of Vector's configuration. Simply add ${MY_ENV_VAR} in your Vector configuration file and the variable will be replaced before being evaluated.

You can learn more in the Environment Variables section.

Field Notation Syntax

The field options support Vector's field notation syntax, enabling access to root-level, nested, and array field values. For example:

# ...
field = "message"
field = "parent.child"
field = "array[0]"
# ...

You can learn more about Vector's field notation in the field notation reference.