PurgeLogs PurgeLogs

yaml
type: "io.kestra.plugin.core.log.PurgeLogs"

Purge flow execution and trigger logs.

This task can be used to purge flow execution and trigger logs for all flows, for a specific namespace, or for a specific flow.

Examples

Purge all logs that has been created more than one month ago.

yaml
id: "purge_logs"
type: "io.kestra.plugin.core.log.PurgeLogs"
endDate: "{{ now() | dateAdd(-1, 'MONTHS') }}"

Purge all logs that has been created more than one month ago, but keep error logs.

yaml
id: "purge_logs"
type: "io.kestra.plugin.core.log.PurgeLogs"
endDate: "{{ now() | dateAdd(-1, 'MONTHS') }}"
logLevels:
  - TRACE
  - DEBUG
  - INFO
  - WARN

Properties

endDate

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

The maximum date to be purged.

All logs before this date will be purged.

flowId

  • Type: string
  • Dynamic: ✔️
  • Required:

The flow ID of the logs to be purged.

You need to provide the namespace properties if you want to purge a flow logs.

logLevels

  • Type: array
  • SubType: string
  • Dynamic:
  • Required:

The levels of the logs to be purged.

If not set, log for any levels will be purged.

namespace

  • Type: string
  • Dynamic: ✔️
  • Required:

Namespace whose logs need to be purged, or namespace of the logs that needs to be purged.

If flowId isn't provided, this is a namespace prefix, else the namespace of the flow.

startDate

  • Type: string
  • Dynamic: ✔️
  • Required:

The minimum date to be purged.

All logs after this date will be purged.

Outputs

count

  • Type: integer
  • Required:
  • Default: 0

The count of deleted logs.

Definitions

Was this page helpful?