projects
/
sitecorepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
249d1e0
)
Only initize logger once
author
W. Trevor King
<wking@drexel.edu>
Thu, 1 Jul 2010 04:18:51 +0000
(
00:18
-0400)
committer
W. Trevor King
<wking@drexel.edu>
Thu, 1 Jul 2010 04:18:51 +0000
(
00:18
-0400)
sitecore/__init__.py
patch
|
blob
|
history
diff --git
a/sitecore/__init__.py
b/sitecore/__init__.py
index 90a38920f97da6ceb2e576a0b689c251594d2bd2..63fc6a2b5252bd9f67f8dbf8090754a327284fcf 100755
(executable)
--- a/
sitecore/__init__.py
+++ b/
sitecore/__init__.py
@@
-37,7
+37,13
@@
try:
except ImportError, e:
WebDriver = e # allow some functionality without selenium
+
+_LOGGER = None
+
def get_logger(verbose=0):
+ global _LOGGER
+ if _LOGGER != None:
+ return LOGGER
verbosities = [ # in order of decreasing severity
logging.CRITICAL,
logging.ERROR,
@@
-59,6
+65,7
@@
def get_logger(verbose=0):
ch.setFormatter(formatter)
# add ch to logger
logger.addHandler(ch)
+ _LOGGER = logger
return logger