
I think I've finally gotten a grasp of the new Mailman logging scheme and I think there's something missing.
I see how the basic logging to files works and how the propagate flag to loginit.initialize() controls propagation to the root 'mailman' logger which logs to the sys.stderr stream.
What I think is missing is something analogous to the old Mailman.Logging.Utils.LogStdErr() to cause writes to sys.stderr to be logged instead of or in addition to being sent to the stderr stream.
The end result of this is that a few messages from bin/mailmanctl and one message from bin/qrunner will only go to the stderr stream and will not be logged. I don't see this as serious as I think all these messages can only occur in response to fatal conditions in direct response to a mailmanctl command.
However, there are also sys.stderr writes in the various scripts invoked by the mail wrapper. These used to be logged as well as written to the stderr stream (where they presumably end up in a DSN). The error conditions that cause these messages occur because of bad alaises or routers in the MTA (things that invoke the wrapper without a list name) or aliases left after a list is removed. These should probably still be logged.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Mark Sapiro wrote:
I don't mean to imply that such a function is necessarily required. Most problems (except maybe for messages from the Python library) can easily be handled by changing the sys.stderr writes to logging calls.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Barry Warsaw wrote:
I'll make these changes to the scripts files when I get to them, if nobody beats me to it.
I've made the changes, but it will be a day or so before I can finish testing and check them in.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Mark Sapiro wrote:
I don't mean to imply that such a function is necessarily required. Most problems (except maybe for messages from the Python library) can easily be handled by changing the sys.stderr writes to logging calls.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Barry Warsaw wrote:
I'll make these changes to the scripts files when I get to them, if nobody beats me to it.
I've made the changes, but it will be a day or so before I can finish testing and check them in.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Barry Warsaw
-
Mark Sapiro