missing import logging.handlers in start-loggerhead

Bug #674008 reported by Hilario J. Montoliu (hjmf)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
loggerhead
Invalid
Undecided
Unassigned

Bug Description

First run of loggerhead 1.18 ends with the following stacktrace::

    # ./start-loggerhead -f -c loggerhead.conf

    WARNING!!! This script has been deprecated by serve-branches, and will be removed in the next release. Please migrate to serve-branches and report any missing features.

    Traceback (most recent call last):
      File "./start-loggerhead", line 146, in <module>
        main()
      File "./start-loggerhead", line 110, in main
        setup_logging(options.log_folder, config, foreground=options.foreground)
      File "/tmp/loggerhead-1.18/loggerhead/trace.py", line 51, in setup_logging
        debug_log = make_handler(config, os.path.join(log_folder, 'debug.log'))
      File "/tmp/loggerhead-1.18/loggerhead/trace.py", line 36, in make_handler
        h = logging.handlers.TimedRotatingFileHandler(filename, 'W0', 1, 100)
    AttributeError: 'module' object has no attribute 'handlers'

To fix it just add an import logging.handlers to start-loggerhead

    === modified file 'start-loggerhead'
    --- start-loggerhead 2010-11-11 12:59:43 +0000
    +++ start-loggerhead 2010-11-11 13:00:18 +0000
    @@ -20,6 +20,7 @@

     import logging
    +import logging.handlers
     from optparse import OptionParser
     import os
     import sys

That seems to fix the problem::

    # ./start-loggerhead -f -c /etc/loggerhead/loggerhead.conf

    WARNING!!! This script has been deprecated by serve-branches, and will be removed in the next release. Please migrate to serve-branches and report any missing features.

    DEB [20101111-14:00:33.047] paste.httpserver.ThreadPool: Started new worker -1223750768: Initial worker pool
    [...]

Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :
Changed in loggerhead:
status: New → Invalid
Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

duplicate of #673999

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.