Skip to content
Discussion options

You must be logged in to vote

Hi @maxdialpad, I cannot reproduce this.

Config:

sources:
  demo_logs_1:
    type: demo_logs
    format: json


transforms:
  t0:
    type: remap
    inputs:
    - demo*
    source: |
        match, err = parse_json(.message)
        if err != null {
          log("Utils Pre-Processor: Failed to jsonify message with error " + err, level: "error", rate_limit_secs:1)
          abort
        } else {
          . = match
        }

sinks:
  console:
    type: console
    inputs: ["t0"]
    encoding:
      codec: json
      json:
        pretty: true

Console:

2025-01-31T16:17:09.372025Z  INFO vector::app: Log level is enabled. level="info,vector::sources::file=debug"
2025-01-31T16:17:09.37648…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by maxdialpad
Comment options

You must be logged in to vote
1 reply
@maxdialpad
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
vrl: compiler Changes to the compiler
2 participants