From 1dc09515beb754f5f8d928969f736519a7476e8e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 23 Feb 2016 14:58:34 +0530 Subject: [PATCH] Fix incorrect handling of max log size --- src/calibre/srv/standalone.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/srv/standalone.py b/src/calibre/srv/standalone.py index 554dd9ac4c..408bd91852 100644 --- a/src/calibre/srv/standalone.py +++ b/src/calibre/srv/standalone.py @@ -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: