git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2303773
)
fix bug
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Thu, 7 Jul 2011 18:37:37 +0000
(14:37 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Thu, 7 Jul 2011 18:37:37 +0000
(14:37 -0400)
sfa/util/sfalogging.py
patch
|
blob
|
history
diff --git
a/sfa/util/sfalogging.py
b/sfa/util/sfalogging.py
index
199066d
..
f1ab177
100755
(executable)
--- 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()
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)
handler.setFormatter(logging.Formatter("%(asctime)s - %(levelname)s - %(message)s"))
self.logger=logging.getLogger(loggername)
self.logger.setLevel(level)