You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2011/06/21 17:35:33 UTC

svn commit: r1138055 - /libcloud/trunk/libcloud/__init__.py

Author: tomaz
Date: Tue Jun 21 15:35:32 2011
New Revision: 1138055

URL: http://svn.apache.org/viewvc?rev=1138055&view=rev
Log:
Revert debug logging to the old behavior.

Modified:
    libcloud/trunk/libcloud/__init__.py

Modified: libcloud/trunk/libcloud/__init__.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/__init__.py?rev=1138055&r1=1138054&r2=1138055&view=diff
==============================================================================
--- libcloud/trunk/libcloud/__init__.py (original)
+++ libcloud/trunk/libcloud/__init__.py Tue Jun 21 15:35:32 2011
@@ -52,10 +52,11 @@ def _init_once():
     default.
     """
     import os
-    if 'LIBCLOUD_DEBUG' in os.environ:
-        debug_file_path = os.environ.get('LIBCLOUD_DEBUG_PATH') or \
-                          DEFAULT_LOG_PATH
-        fh = open(debug_file_path, 'a')
-        enable_debug(fh)
+    d = os.getenv('LIBCLOUD_DEBUG')
+    if d:
+        if d.isdigit():
+            d = DEFAULT_LOG_PATH
+        fo = open(d, 'a')
+        enable_debug(fo)
 
 _init_once()