~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to start-loggerhead

  • Committer: Martin Albisetti
  • Date: 2008-08-06 19:20:57 UTC
  • mfrom: (197.1.9 pathargs)
  • Revision ID: argentina@gmail.com-20080806192057-3bvnwx9ap53kw8v0
Misplaced fix syntax patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from paste.httpexceptions import make_middleware
30
30
from paste.translogger import make_filter
31
31
 
32
 
from loggerhead import daemon
 
32
from loggerhead import daemon, release
33
33
from loggerhead.apps.config import Root
34
34
 
35
35
 
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', 1, 100)
 
39
        h = logging.handlers.TimedRotatingFileHandler(filename, 'midnight', 0, 100)
40
40
    elif roll == 'weekly':
41
 
        h = logging.handlers.TimedRotatingFileHandler(filename, 'W0', 1, 100)
 
41
        h = logging.handlers.TimedRotatingFileHandler(filename, 'W0', 0, 100)
42
42
    else:
43
43
        h = logging.FileHandler(filename)
44
44
    return h
79
79
    default_pidfile = os.path.join(home, 'loggerhead.pid')
80
80
    default_configfile = os.path.join(home, 'loggerhead.conf')
81
81
    default_log_folder = os.path.join(home, 'logs')
82
 
    parser = OptionParser(usage='usage: %prog [options]', version='%prog')
 
82
    parser = OptionParser(usage='usage: %prog [options]', version='%prog ' + release.version)
83
83
    parser.add_option('-f', '--foreground', action='store_true', dest='foreground', default=False,
84
84
                      help="run in the foreground; don't daemonize")
85
85
    parser.add_option('-C', '--check', action='store_true', dest='check', default=False,