Core Plugins and tasks Log

Core Plugins and tasks Log

Certified

Emit log entries from a flow.

Render one or many messages (strings or arrays) and write them to the task log at a specified level.

Uses the same templating engine as other tasks, so you can interpolate variables or secrets. The level property sets the severity of the emitted entry; the flow-level logLevel setting still controls which entries are persisted, so align both when troubleshooting missing logs.

yaml
type: io.kestra.plugin.core.log.Log

Log a DEBUG level message containing expressions.

yaml
id: send_logs
namespace: company.team

tasks:
  - id: hello
    type: io.kestra.plugin.core.log.Log
    level: DEBUG
    message: "{{ task.id }} started at {{ taskrun.startDate }}"

Log one or more messages to the console.

yaml
id: hello_world
namespace: company.team

tasks:
  - id: greeting
    type: io.kestra.plugin.core.log.Log
    message:
      - Kestra team wishes you a great day 👋
      - If you need some help, reach out via Slack
Properties

One or more message(s) to be sent to the backend as logs

It can be a string or an array of strings.

DefaultINFO
Possible Values
ERRORWARNINFODEBUGTRACE

The level on which the message should be logged. Note that this is different from the core logLevel property which sets the minimum log level to be persisted in the backend database. The level property is used to determine the log level of the message emitted by the Log task, while logLevel is used to filter which logs should be stored in the backend. Both properties can be used together to control the log level of the message emitted by the task and the logs that are persisted in the backend. If not specified, the level defaults to INFO.

Reference (ref) of the pluginDefaults to apply to this task.