mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-18 20:37:57 +00:00
Fix minor bugs with log rotation support. Ref #1586
This commit is contained in:
parent
5cbfafbeb2
commit
591d4f29ff
@ -127,7 +127,7 @@ def parse_arguments(argv):
|
||||
"quiet": config.getboolean("quiet", False),
|
||||
"debug": config.getboolean("debug", False),
|
||||
"logfile": config.getboolean("logfile", ""),
|
||||
"logmaxsize": config.get("logfile", 10000000), # default is 10MB
|
||||
"logmaxsize": config.get("logmaxsize", 10000000), # default is 10MB
|
||||
"logbackupcount": config.get("logbackupcount", 10),
|
||||
"logcompression": config.getboolean("logcompression", False)
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ class CompressedRotatingFileHandler(RotatingFileHandler):
|
||||
self.stream = self._open()
|
||||
|
||||
|
||||
def init_logger(level, logfile=None, max_bytes=1000000000, backup_count=10, compression=True, quiet=False):
|
||||
def init_logger(level, logfile=None, max_bytes=10000000, backup_count=10, compression=True, quiet=False):
|
||||
if logfile and len(logfile) > 0:
|
||||
if compression:
|
||||
stream_handler = CompressedRotatingFileHandler(logfile, maxBytes=max_bytes, backupCount=backup_count)
|
||||
|
Loading…
Reference in New Issue
Block a user