sergeant icon indicating copy to clipboard operation
sergeant copied to clipboard

add option to avoid "task has failed" log

Open nsteinberg-r7 opened this issue 5 years ago • 0 comments

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.

nsteinberg-r7 avatar Jan 27 '21 14:01 nsteinberg-r7