question about rotating logs from FAQ
![](https://secure.gravatar.com/avatar/acf9a041b1958056bfb75480e8be4df5.jpg?s=120&d=mm&r=g)
Hello all,
I recently upgraded to the latest version of Mailman. I had been using a change in /Mailman/Logging/Logger.py to rename logfiles with the *.log extension. This was as suggested from the Mailman FAQ:
http://wiki.list.org/pages/viewpage.action?pageId=4030580
So, I modified the file as specified and restarted Mailman. Here is the result. It looks like it has a problem with the punctuation in the added line (the last line). This specifically mentions version 2.1.9, so is this still doable with version 2.1.13?
Traceback (most recent call last): File "./mailmanctl", line 107, in ? from Mailman import Utils File "/usr/local/mailman/Mailman/Utils.py", line 56, in ? from Mailman.Logging.Syslog import syslog File "/usr/local/mailman/Mailman/Logging/Syslog.py", line 25, in ? from Mailman.Logging.StampedLogger import StampedLogger File "/usr/local/mailman/Mailman/Logging/StampedLogger.py", line 20, in ? from Mailman.Logging.Logger import Logger File "/usr/local/mailman/Mailman/Logging/Logger.py", line 46 self.__filename \+= '.log' ^
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Christopher Adams wrote:
I recently upgraded to the latest version of Mailman. I had been using a change in /Mailman/Logging/Logger.py to rename logfiles with the *.log extension. This was as suggested from the Mailman FAQ:
http://wiki.list.org/pages/viewpage.action?pageId=4030580
So, I modified the file as specified and restarted Mailman. Here is the result. It looks like it has a problem with the punctuation in the added line (the last line). This specifically mentions version 2.1.9, so is this still doable with version 2.1.13?
Traceback (most recent call last): File "./mailmanctl", line 107, in ? from Mailman import Utils File "/usr/local/mailman/Mailman/Utils.py", line 56, in ? from Mailman.Logging.Syslog import syslog File "/usr/local/mailman/Mailman/Logging/Syslog.py", line 25, in ? from Mailman.Logging.StampedLogger import StampedLogger File "/usr/local/mailman/Mailman/Logging/StampedLogger.py", line 20, in ? from Mailman.Logging.Logger import Logger File "/usr/local/mailman/Mailman/Logging/Logger.py", line 46 self.__filename \+= '.log'
When that FAQ was converted from the old FAQ Wizard, the formatting got messed up. Look at it again (I think I've cleaned it up).
I may also add yet another logrotate suggestion later.
The basic problem above is there should not be a '\' preceding '+=' in the patch you applied.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Christopher Adams
-
Mark Sapiro