github.com/GuanceCloud/cliutils@v1.1.21/pipeline/ptinput/funcs/md/exit.en.md (about)

     1  ### `exit()` {#fn-exit}
     2  
     3  Function prototype: `fn exit()`
     4  
     5  Function description: End the parsing of the current log, if the function drop() is not called, the parsed part will still be output
     6  
     7  ```python
     8  # in << {"str_a": "2", "str_b": "3"}
     9  json(_, str_a)
    10  if str_a == "2"{
    11    exit()
    12  }
    13  json(_, str_b)
    14  
    15  # Extracted data(drop: false, cost: 48.233µs):
    16  # {
    17  #   "message": "{\"str_a\": \"2\", \"str_b\": \"3\"}",
    18  #   "str_a": "2"
    19  # }
    20  ```