Skip to content

Commit

Permalink
Handle --max-bytes being passed without --backup-count.
Browse files Browse the repository at this point in the history
In this case we want to force --backup-count=1 so that
we can setup logging properly and rotate the log file.

This fixes OpenTSDB#59.
  • Loading branch information
tsuna committed Jan 20, 2013
1 parent ba8f0e9 commit ca4e42c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tcollector.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ def parse_cmdline(argv):
parser.error('--evict-interval must be strictly greater than '
'--dedup-interval')
# We cannot write to stdout when we're a daemon.
if options.daemonize and not options.backup_count:
if (options.daemonize or options.max_bytes) and not options.backup_count:
options.backup_count = 1
return (options, args)

Expand Down

0 comments on commit ca4e42c

Please sign in to comment.