We are currently using two separate bots to send log messages from WMCS cookbooks to SAL:
- SALLogger from wmcs_libs.common (only used by WMCS cookbooks)
- SALLogger writes to IRC by sending a message to wm-bot, which is running on wm-bot.wm-bot.wmcloud.org
- sal_logger from spicerack/_log.py (used by both production and wmcs cookbooks, because it's embedded in Spicerack)
- sal_logger writes to IRC by sending a message to tcpircbot (aka logmsgbot), which is running on alert1001.wikimedia.org
- when we run WMCS cookbooks from a laptop, sal_logger is disabled
The log messages sent via the two bots are formatted slightly differently, and can appear in the wrong order (a message sent by bot A sometimes appear in SAL after a message sent by bot B, even if it was generated before).
It would be nice to use a single method. One blocker is that tcpircbot is currently not reachable from the public internet, so it cannot be used when running cookbooks from a laptop. This is tracked in T343336.