Documentation

Logs and templates

Use plain text, JSON, or logfmt logs and reshape structured output in the TUI.

Log modes

Vectron can route process output to:

  • console
  • files
  • both

The default behavior is configured globally and can be overridden per process.

Defaults involved here:

  • global.log_mode: default console
  • process.log_mode: inherits global.log_mode

Log formats

Supported log formats include:

  • text
  • logfmt
  • json
  • json_pretty

Choose a structured format when you want the TUI to extract fields and render them differently from the original raw line.

Defaults involved here:

  • global.log_format: default text
  • process.log_format: inherits global.log_format

Templates only affect rendered output

Log templates reshape structured lines for the console and history view. File sinks still keep the original raw process output.

This separation matters:

  • rendered logs can be short and readable
  • file logs remain faithful to the child process output

Presets

Define presets under [log_templates.<name>], then bind them through:

  • [global.log_template]
  • [process.log_template]

Use:

  • preset
  • stdout_preset
  • stderr_preset

Defaults involved here:

  • preset: default none
  • stdout_preset: default none
  • stderr_preset: default none
  • layout separator: effective default " "
  • field format: effective default none
  • field visible_if: effective default always

Disable child ANSI colors when needed

When parsing JSON or logfmt from child processes, ANSI color sequences can be undesirable. Use:

[global]
disable_color_env = true

Override per process if needed.

Defaults involved here:

  • global.disable_color_env: default false
  • process.disable_color_env: inherits global.disable_color_env