summaryrefslogtreecommitdiff
path: root/git/objects/submodule/root.py
diff options
context:
space:
mode:
authorJames Nowell <jcnowell@missionfocus.com>2015-06-25 09:24:40 -0400
committerJames Nowell <jcnowell@missionfocus.com>2015-06-25 09:24:40 -0400
commitaa0ccead680443b07fd675f8b906758907bdb415 (patch)
treef60f653c3d9873cb42de7d7ef9307c1354f3da86 /git/objects/submodule/root.py
parent640d1506e7f259d675976e7fffcbc854d41d4246 (diff)
downloadgitpython-aa0ccead680443b07fd675f8b906758907bdb415.tar.gz
Added NullHandlers to all loggers to preven "No handler" messages
When the code is run without setting up loggers, the loggers have no handlers for the emitted messages. The logging module displays: `No handlers could be found for logger "git.cmd"` on the console. By adding a NullHandler (a no-op) the message disappears, and doesn't affect logging when other handlers are configured.
Diffstat (limited to 'git/objects/submodule/root.py')
-rw-r--r--git/objects/submodule/root.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/git/objects/submodule/root.py b/git/objects/submodule/root.py
index 1c863f6f..4fe856c2 100644
--- a/git/objects/submodule/root.py
+++ b/git/objects/submodule/root.py
@@ -13,6 +13,7 @@ import logging
__all__ = ["RootModule", "RootUpdateProgress"]
log = logging.getLogger('git.objects.submodule.root')
+log.addHandler(logging.NullHandler())
class RootUpdateProgress(UpdateProgress):