mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 15:04:08 +02:00
Fix incorrect handling of max log size
This commit is contained in:
parent
0ce29d414c
commit
1dc09515be
1 changed files with 3 additions and 2 deletions
|
|
@ -58,10 +58,11 @@ class Server(object):
|
|||
|
||||
def __init__(self, libraries, opts):
|
||||
log = access_log = None
|
||||
log_size = opts.max_log_size * 1024 * 1024
|
||||
if opts.log:
|
||||
log = RotatingLog(opts.log, max_size=opts.max_log_size)
|
||||
log = RotatingLog(opts.log, max_size=log_size)
|
||||
if opts.access_log:
|
||||
access_log = RotatingLog(opts.access_log, max_size=opts.max_log_size)
|
||||
access_log = RotatingLog(opts.access_log, max_size=log_size)
|
||||
self.handler = Handler(libraries, opts)
|
||||
plugins = []
|
||||
if opts.use_bonjour:
|
||||
|
|
|
|||
Loading…
Reference in a new issue