X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Futil%2Fsfalogging.py;fp=sfa%2Futil%2Fsfalogging.py;h=f1ab1778a6d567965a5cb4405f6c98e259ad7b5a;hb=ebd4fa3bab6d00966b03dd7e602d5169625998fd;hp=199066d03eceea8d1cab3a607b77966d5336d65f;hpb=2303773af36a8798946913a6c3f4c4dd71d13d11;p=sfa.git 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)