Log
Used to log something while your target is evaluated; good for printing out some data set with set_data, especially when using complex pipelines. Can also stop the buildprocess (most usefull when wrapped by an if).
The first argument is the level and can any of the following:
tracedebuginfowarnerrorfatalIn addition, all of them have a_stopvariant which will stop the buildprocess.
The second argument is the format string given to the logger. You can use all your typical printf style formatters here like %s, %d and so on. As input for this formatting, all arguments after the format itself are used; which makes this command variadic.
Examples:
log trace "Test: %d" 123
log fatal_stop "Test: %d" 123
| Arguments | |||
|---|---|---|---|
| # | Name | Type | Info |
| 0 |
level
|
sym
|
Loglevel; see list above |
| 1 |
format
|
str
|
The format string given to the logger Expanded?: ✅ |
| 2+ |
...
|
vararg
|
Varargs |