Only configure logging handlers if not already present.

main
Selwin Ong 12 years ago
parent a247c6eaa1
commit d1f586b413

@ -15,6 +15,7 @@ logger = logging.getLogger(__name__)
def setup_loghandlers(args): def setup_loghandlers(args):
if not logging._handlers:
logging.config.dictConfig({ logging.config.dictConfig({
"version": 1, "version": 1,
"disable_existing_loggers": False, "disable_existing_loggers": False,
@ -91,3 +92,6 @@ def main():
except ConnectionError as e: except ConnectionError as e:
print(e) print(e)
sys.exit(1) sys.exit(1)
if __name__ == "__main__":
main()
Loading…
Cancel
Save