How to write custom message to the default file? #1669
-
I extend the Alerter class to send the alert. Is it possible to log the custom error message to the default elastalert.log? class TestAlerter(Alerter):
for match_data in matches:
if match_data is None:
logger.error('no match data') |
Beta Was this translation helpful? Give feedback.
Answered by
jertel
May 16, 2025
Replies: 1 comment
-
Yes, import the logger from the |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
f1238762001
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, import the logger from the
elastalert.util
module and those logs will output with the other elastalert logs. If they don't show up then it's likely a logger configuration issue in your config.yaml.