[ARVADOS] created: eedc16089c408e7386039e2ae32303dff888adb0

git at public.curoverse.com git at public.curoverse.com
Tue Aug 12 13:50:41 EDT 2014


        at  eedc16089c408e7386039e2ae32303dff888adb0 (commit)


commit eedc16089c408e7386039e2ae32303dff888adb0
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Aug 12 13:50:17 2014 -0400

    3457: Avoid calling logging.getLogger() before logging.basicConfig().
    
    Otherwise, we get occasional episodes of:
    
    No handlers could be found for logger "arv-get"

diff --git a/sdk/python/arvados/api.py b/sdk/python/arvados/api.py
index 8a71b90..a1f35a0 100644
--- a/sdk/python/arvados/api.py
+++ b/sdk/python/arvados/api.py
@@ -83,7 +83,8 @@ def api(version=None, cache=True, **kwargs):
     keyword arguments are missing, this function will set default values for
     them, based on the current Arvados configuration settings."""
     if config.get('ARVADOS_DEBUG'):
-        logging.basicConfig(level=logging.DEBUG)
+        logging.basicConfig()
+        logging.getLogger().setLevel(logging.DEBUG)
 
     if not cache or not services.get(version):
         if not version:
diff --git a/sdk/python/bin/arv-get b/sdk/python/bin/arv-get
index 7f07e22..3b4405f 100755
--- a/sdk/python/bin/arv-get
+++ b/sdk/python/bin/arv-get
@@ -8,6 +8,7 @@ import string
 import sys
 import logging
 
+logging.basicConfig()
 logger = logging.getLogger(os.path.basename(sys.argv[0]))
 
 parser = argparse.ArgumentParser(
diff --git a/sdk/python/bin/arv-ls b/sdk/python/bin/arv-ls
index 1432274..676bc7c 100755
--- a/sdk/python/bin/arv-ls
+++ b/sdk/python/bin/arv-ls
@@ -8,6 +8,7 @@ import string
 import sys
 import logging
 
+logging.basicConfig()
 logger = logging.getLogger(os.path.basename(sys.argv[0]))
 
 parser = argparse.ArgumentParser(
diff --git a/sdk/python/bin/arv-normalize b/sdk/python/bin/arv-normalize
index 0506381..c4a7cef 100755
--- a/sdk/python/bin/arv-normalize
+++ b/sdk/python/bin/arv-normalize
@@ -8,6 +8,7 @@ import string
 import sys
 import logging
 
+logging.basicConfig()
 logger = logging.getLogger(os.path.basename(sys.argv[0]))
 
 parser = argparse.ArgumentParser(

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list