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/10/20 21:32:39 UTC

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

Author: tomaz
Date: Thu Oct 20 19:32:38 2011
New Revision: 1187006

URL: http://svn.apache.org/viewvc?rev=1187006&view=rev
Log:
User must now explicitly specify a path when LIBCLOUD_DEBUG env. variable is used. Reported by daveb, part of LIBCLOUD-95.

Modified:
    libcloud/trunk/libcloud/__init__.py

Modified: libcloud/trunk/libcloud/__init__.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/__init__.py?rev=1187006&r1=1187005&r2=1187006&view=diff
==============================================================================
--- libcloud/trunk/libcloud/__init__.py (original)
+++ libcloud/trunk/libcloud/__init__.py Thu Oct 20 19:32:38 2011
@@ -22,8 +22,6 @@ libcloud provides a unified interface to
 __all__ = ["__version__", "enable_debug"]
 __version__ = '0.6.0-beta1'
 
-DEFAULT_LOG_PATH = '/tmp/libcloud_debug.log'
-
 
 def enable_debug(fo):
     """
@@ -47,16 +45,11 @@ def _init_once():
 
     This checks for the LIBCLOUD_DEBUG enviroment variable, which if it exists
     is where we will log debug information about the provider transports.
-
-    If LIBCLOUD_DEBUG is not a path, C{/tmp/libcloud_debug.log} is used by
-    default.
     """
     import os
-    d = os.getenv('LIBCLOUD_DEBUG')
-    if d:
-        if d.isdigit():
-            d = DEFAULT_LOG_PATH
-        fo = open(d, 'a')
+    path = os.getenv('LIBCLOUD_DEBUG')
+    if path:
+        fo = open(path, 'a')
         enable_debug(fo)
 
 _init_once()