Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nsteinberg-r7 opened this issue Jan 27, 2021 · 0 comments
Open

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

nsteinberg-r7 opened this issue Jan 27, 2021 · 0 comments

Comments

@nsteinberg-r7
Copy link
Contributor

nsteinberg-r7 commented Jan 27, 2021

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 nsteinberg-r7 changed the title calling logger.error from on_failure not working under specific configuration add option to avoid "task has failed" log Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant