If somebody writes "fail sliently", I expect "without any notice" automatically. There is a notice, but the notice isn't processed by the operator or their bots.
You cannot save an edit that is being denied. This is what such filters are used to, to prevent some edits. Still, not a framework problem IMHO.
Really? Imagine we have this feature and imagine a bot operator that says "Hey, you can notify the bot operator via email, let's implement SMS as well". Then, other bot operators can require a lot of different notification types. This will make Pywikibot unsustainable. Instead, let's follow a good Unix rule. One program should focus on only one thing. If I'm writing a framework that is interacting with MW API (purpose of Pywikibot), it should interact with MW API and not monitor logs. If I want to monitor logs, I should use another program (generally called log watcher) that focuses on watching/monitoring logs and reporting some patterns to the admin.
I store all logs from my Pywikibot scripts in ~/logs. If I want, I can create a maintenance job to monitor the logs. It will generally execute something like this. It would be relatively easy to modify this to monitor other bots (multiple maintenance jobs, or one running in multiple threads) and/or include the traceback directly in the mail.
tail -Fn0 /data/project/urbanecmbot/logs/archivePages.log | \
while read line ; do
echo "$line" | grep -q "ERROR"
if [ $? = 0 ]
then
echo "Fatal error in ArchiveBot, see /data/project/urbanecmbot/logs/archivePages.log for details" | /usr/bin/mail -s "Error notification" martin.urbanec@wikimedia.cz fi
done
I didn't say a human should do it. I said that the bot operator is expected to monitor the logs, either themselfes or using a bot. It is the same for system administrator. The services running in the system log various events into log service, but this is the only thing it does. The log service store the events in logfiles (default setting) or to dedicated log server. If the sysadmin want to know about some events by email/SMS/whatever, they should employ a service that is supposed to monitor for given patterns in given log files.
_______________________________________________
pywikibot mailing list
pywikibot@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot