Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-38395

Python global logger is polluted when importing certain resmokelib modules

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.7, 4.0.12
    • Component/s: Testing Infrastructure
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v4.0
    • Sprint:
      DAG 2018-12-31
    • Story Points:
      1

      Description

      It was discovered that the global logging in buildscripts/update_test_lifecycle.py gets overriden by buildscripts/mobile/adb_monitor.py because of the resmokelib imports.

      The file buildscripts/mobile/benchrun_embedded_setup_android.py also has similar issue.

      The logging setting should not be done in the global scope but in the main function:

      logging.basicConfig(format="%(asctime)s %(levelname)s %(message)s", level=logging.INFO)
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: