quick logging tmp dir change
authorJosh Karlin <jkarlin@bbn.com>
Wed, 5 May 2010 20:31:06 +0000 (20:31 +0000)
committerJosh Karlin <jkarlin@bbn.com>
Wed, 5 May 2010 20:31:06 +0000 (20:31 +0000)
sfa/util/sfalogging.py

index 75e7851..0e17ccb 100644 (file)
@@ -7,12 +7,14 @@ SFA_HTTPD_ACCESS_LOGFILE = TMPDIR + "/" + 'sfa_httpd_access.log'
 SFA_ACCESS_LOGFILE='/var/log/sfa_access.log'
 logger=logging.getLogger()
 logger.setLevel(logging.INFO)
+
 try:
-     logfile=logging.FileHandler(SFA_ACCESS_LOGFILE)
+    logfile=logging.FileHandler(SFA_ACCESS_LOGFILE)
 except IOError:
-     # This is usually a permissions error becaue the file is
-     # owned by root, but httpd is trying to access it.
-     logfile=logging.FileHandler(SFA_HTTPD_ACCESS_LOGFILE)
+    # This is usually a permissions error becaue the file is
+    # owned by root, but httpd is trying to access it.
+    logfile=logging.FileHandler(SFA_HTTPD_ACCESS_LOGFILE)
+    
 formatter = logging.Formatter("%(asctime)s - %(message)s")
 logfile.setFormatter(formatter)
 logger.addHandler(logfile)