Commits

Andrew Godwin  committed 3c255ec

Fix logging issues

  • Participants
  • Parent commits 3d71770

Comments (0)

Files changed (1)

File south/logger.py

     logging_file = getattr(settings, "SOUTH_LOGGING_FILE", False)
     
     if debug_on:
-        if logging_file and len(_logger.handlers) < 2:
-            _logger.addHandler(logging.FileHandler(logging_file))
-            _logger.setLevel(logging.DEBUG)
+        if logging_file:
+            if len(_logger.handlers) < 2:
+                _logger.addHandler(logging.FileHandler(logging_file))
+                _logger.setLevel(logging.DEBUG)
         else:
             raise IOError, "SOUTH_LOGGING_ON is True. You also need a SOUTH_LOGGING_FILE setting."