Joe McDonnell has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/16679


Change subject: IMPALA-10304: Fix log level and format for pytests
......................................................................

IMPALA-10304: Fix log level and format for pytests

Recent testing showed that the pytests are not
respecting the log level and format set in
conftest.py's configure_logging(). It is using
the default log level of WARNING and the
default formatter.

The issue is that logging.basicConfig() is only
effective the first time it is called. The code
in lib/python/impala_py_lib/helpers.py does a
call to logging.basicConfig() at the global
level, and conftest.py imports that file. This
renders the call in configure_logging()
ineffective.

To avoid this type of confusion, logging.basicConfig()
should only be called from the main() functions for
libraries. This removes the call in lib/python/impala_py_lib
(as it is not needed for a library without a main function).
It also fixes up various other locations to move the
logging.basicConfig() call to the main() function.

Testing:
 - Ran the end to end tests and custom cluster tests
 - Confirmed the logging format
 - Added an assert in configure_logging() to test that
   the INFO log level is applied to the root logger.

Change-Id: I5d91b7f910b3606c50bcba4579179a0bc8c20588
---
M bin/dump_breakpad_symbols.py
M bin/run-workload.py
M bin/start-impala-cluster.py
M lib/python/impala_py_lib/helpers.py
M tests/conftest.py
M tests/shell/util.py
M tests/stress/query_retries_stress_runner.py
7 files changed, 14 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/79/16679/1
--
To view, visit http://gerrit.cloudera.org:8080/16679
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d91b7f910b3606c50bcba4579179a0bc8c20588
Gerrit-Change-Number: 16679
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <joemcdonn...@cloudera.com>

Reply via email to