Skip to content

add option to avoid "task has failed" log #27

@nsteinberg-r7

Description

@nsteinberg-r7

Currently every time a worker enters on_failure it writes an error log with message "task has failed".
If I set my worker config to avoid that, like this:

logging=sergeant.config.Logging(
            events=sergeant.config.LoggingEvents(
                on_failure=False,
            ),
        ),

then I don't get any logs at all.

A desired behavior for me is to be able to log WARNING on some exceptions without having always an ERROR log with it.
It would improve logs clarity and will let us write cleaner elastalert rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions