~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to start-loggerhead

  • Committer: Martin Albisetti
  • Date: 2008-08-11 20:09:44 UTC
  • Revision ID: argentina@gmail.com-20080811200944-g1mdlbkc6r33m5rw
Make logs actually rotate. Bug #242806

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
def make_handler(config, filename):
37
37
    roll = config.get('log.roll', 'never')
38
38
    if roll == 'daily':
39
 
        h = logging.handlers.TimedRotatingFileHandler(filename, 'midnight', 0, 100)
 
39
        h = logging.handlers.TimedRotatingFileHandler(filename, 'midnight', 1, 100)
40
40
    elif roll == 'weekly':
41
 
        h = logging.handlers.TimedRotatingFileHandler(filename, 'W0', 0, 100)
 
41
        h = logging.handlers.TimedRotatingFileHandler(filename, 'W0', 1, 100)
42
42
    else:
43
43
        h = logging.FileHandler(filename)
44
44
    return h