You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
Syntax and functions
Data transformation syntax
Copy page
Download PDF
Data transformation syntax
TLS DSL offers more than forty built-in functions for data transformation tasks.​
Syntax introduction​
TLS DSL is a Python-like log transformation language. In addition to basic data structures, the syntax organizes rules through function combinations.​
​
Category​
Module​
Description​
Data structure​
Numbers, strings, and booleans​
Supported. Does not support """-style strings.​
​
Lists and dictionaries​
Supported.​
Basic syntax​
Operator​
Not supported; but can be indirectly supported via functions.​
​
Annotation​
Supported; only supports comments starting with #.​
​
Variable definition​
Not supported; you can pass values via function calls, such as f_set(xxx, "value").​
​
Conditional control​
Supports functions with conditional semantics, such as c_if, c_if_else, c_switch.​
​
Loop​
Not supported.​
Function​
Define function or lambda​
Not supported.​
​
Function call​
Supported. You can call functions provided by TLS DSL.​
​
Function categories​
TLS DSL functions are mainly divided into two types:​
  • Global operation functions: used to control workflow, receive logs, process, and return logs.​
  • Expression functions: accept parameters with specific data structures and return values after combined invocation. You can pass the results of expression function calls as parameters to global operation functions to define more flexible transformation logic.​
The comparison of the two types of functions is as follows:​
​
Function type​
Global step​
Output​
Modify log​
Global operation function​
Supported​
Zero or more logs​
Supported​
Expression functions​
Not supported​
Specific data structure​
Not supported​
​
​
Last updated: 2026.04.16 15:34:23