Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-13351

Enable debug level logging when building/running qserv unit tests.

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Change the unit test logging for qserv to record debug level messages so it is easier to debug intermittent failures. 

        Attachments

          Activity

          Hide
          salnikov Andy Salnikov added a comment -

          For now our unit tests are all C++ aplications, so we do not need to care about Python logging vs C++ log4cxx logging.

          Obvious way to configure log4cxx at runtime is to use configuration file and point LSST_LOG_CONFIG envvar to that file. One minor issue is whether do want to use pre-existing config file or create new temporary config file while running UnitTest. We already one config file in admin/templates/configuration/etc/log4cxx.unittest.properties which looks like it should be used for unit tests, trouble with that file is that it's in some unconventional location outside our regular source directory (core/modules). We could potentially copy that file inside core/modules/tests folder if that make it more convenient to use in scons.

           

           

          Show
          salnikov Andy Salnikov added a comment - For now our unit tests are all C++ aplications, so we do not need to care about Python logging vs C++ log4cxx logging. Obvious way to configure log4cxx at runtime is to use configuration file and point LSST_LOG_CONFIG envvar to that file. One minor issue is whether do want to use pre-existing config file or create new temporary config file while running UnitTest. We already one config file in admin/templates/configuration/etc/log4cxx.unittest.properties which looks like it should be used for unit tests, trouble with that file is that it's in some unconventional location outside our regular source directory (core/modules). We could potentially copy that file inside core/modules/tests folder if that make it more convenient to use in scons.    
          Hide
          salnikov Andy Salnikov added a comment -

          John Gates, can I ask you to review my changes? It's SCons Python so it may be impossible to understand what it does but we don't have other scons experts and any input is useful. Jira is still slow in linking to github, PR is: https://github.com/lsst/qserv/pull/369

          Show
          salnikov Andy Salnikov added a comment - John Gates , can I ask you to review my changes? It's SCons Python so it may be impossible to understand what it does but we don't have other scons experts and any input is useful. Jira is still slow in linking to github, PR is:  https://github.com/lsst/qserv/pull/369
          Hide
          jgates John Gates added a comment -

          I'm not a scons expert, but it looks fine to me.

          Show
          jgates John Gates added a comment - I'm not a scons expert, but it looks fine to me.
          Hide
          salnikov Andy Salnikov added a comment -

          John, thanks for review. I fixed docstring and merged.

          (And I need not mention that agreeing to review it you automatically became an expert in scons )

           

          Show
          salnikov Andy Salnikov added a comment - John, thanks for review. I fixed docstring and merged. (And I need not mention that agreeing to review it you automatically became an expert in scons  )  

            People

            • Assignee:
              salnikov Andy Salnikov
              Reporter:
              jgates John Gates
              Reviewers:
              John Gates
              Watchers:
              Andy Salnikov, John Gates
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: