From ebd4fa3bab6d00966b03dd7e602d5169625998fd Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Thu, 7 Jul 2011 14:37:37 -0400 Subject: [PATCH] fix bug --- sfa/util/sfalogging.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sfa/util/sfalogging.py b/sfa/util/sfalogging.py index 199066d0..f1ab1778 100755 --- a/sfa/util/sfalogging.py +++ b/sfa/util/sfalogging.py @@ -36,7 +36,8 @@ class _SfaLogger: if os.path.exists(tmplogfile) and not os.access(tmplogfile,os.W_OK): loggername = loggername + "-console" handler = logging.StreamHandler() - handler=logging.handlers.RotatingFileHandler(tmplogfile,maxBytes=1000000, backupCount=5) + else: + handler=logging.handlers.RotatingFileHandler(tmplogfile,maxBytes=1000000, backupCount=5) handler.setFormatter(logging.Formatter("%(asctime)s - %(levelname)s - %(message)s")) self.logger=logging.getLogger(loggername) self.logger.setLevel(level) -- 2.47.0