Uploaded image for project: 'Qt Quality Assurance Infrastructure'
  1. Qt Quality Assurance Infrastructure
  2. QTQAINFRA-5388

Refactor logging for coin_testresults_parser

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P2: Important
    • None
    • None
    • Metrics / Test Results
    • None

    Description

      Instead of using custom prints, the module should use the logging module for printing to cooperate best with the script that imports it.

      As a first thing in the script you can do:

      import logging
      L = logging.getLogger(__name__)
      

      This will import the logger as is defined in the main script or define a new one if the module is running standalone.

      And then you can do the following whenever you want to print:

      L.debug()
      L.info()
      L.warning()
      L.error()
      

      Etc. Check the logging documentation. Some attention is needed in the formatting, most times it is needed to use %s placeholders to be replaced with the arguments that follow.

      Check existing files like coin_util.py for example.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            teheikki Tero Heikkinen
            jimis Dimitrios Apostolou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes