
Core Plugins and tasks PurgeLogs
CertifiedPurge execution and trigger logs.
Core Plugins and tasks PurgeLogs
Purge execution and trigger logs.
Deletes logs in bulk by namespace/flow/execution filters and optional level/date ranges. Requires namespace authorization when targeting other namespaces.
For performance, use this instead of per-execution deletions; consider keeping ERROR logs by filtering logLevels.
type: io.kestra.plugin.core.log.PurgeLogsExamples
Purge all logs that has been created more than one month ago.
id: purge
namespace: system
tasks:
- 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.
id: purge
namespace: system
tasks:
- id: purge
type: io.kestra.plugin.core.log.PurgeLogs
endDate: "{{ now() | dateAdd(-1, 'MONTHS') }}"
logLevels:
- TRACE
- DEBUG
- INFO
- WARN
Properties
endDate *Requiredstring
The maximum date to be purged
All logs before this date will be purged.
executionId string
The Execution ID of the logs to be purged
flowId string
The flow ID of the logs to be purged
You need to provide the namespace property if you want to purge flow logs.
logLevels array
ERRORWARNINFODEBUGTRACEThe levels of the logs to be purged
If not set, log for all levels will be purged.
namespace string
Namespace of logs that need to be purged
If flowId isn't provided, this is a namespace prefix, else the namespace of the flow.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
startDate string
The minimum date to be purged
All logs after this date will be purged.
Outputs
count integer
0The count of deleted logs