Uploaded image for project: 'Request For Comments'
  1. Request For Comments
  2. RFC-570

Drop support for hierarchical context in lsst.log

    XMLWordPrintable

    Details

    • Type: RFC
    • Status: Implemented
    • Resolution: Done
    • Component/s: DM
    • Labels:
      None

      Description

      lsst.log currently implements support for a "hierarchical context" which is a global default logger behaving like a stack of loggers (supporting push/pop operations). This feature adds a lot of complexity to the implementation but it is not very useful and it is no being used by any LSST code now - I searched lsst repositories and found no matches for relevant methods or macros. 

      I propose to immediately remove (without deprecation period) the code from lsst.log which implements this feature:

      • C++ macros LOG_PUSHCTX, LOG_POPCTX
      • corresponding C++ static methods Log::push/popContext()
      • C++ class LogContext which implement RAII idiom for logging context
      • Python wrappers for the above classes/methods

      Note that this does not remove support for Mapped Diagnostic Context (MDC) which is used by qserv today and is potentially useful for other applications.

      Link to C++ header: https://github.com/lsst/log/blob/master/include/lsst/log/Log.h

        Attachments

          Issue Links

            Activity

            Hide
            ktl Kian-Tat Lim added a comment -

            I presume this also does not remove support for hierarchical logger names and thresholds.

            Show
            ktl Kian-Tat Lim added a comment - I presume this also does not remove support for hierarchical logger names and thresholds.
            Hide
            salnikov Andy Salnikov added a comment -

            No, definitely not, logger naming and level control will stay the same.

            Show
            salnikov Andy Salnikov added a comment - No, definitely not, logger naming and level control will stay the same.
            Hide
            Parejkoj John Parejko added a comment -

            I support removing code.

            Show
            Parejkoj John Parejko added a comment - I support removing code.
            Hide
            tjenness Tim Jenness added a comment -

            If we aren't using it anywhere and it's getting in the way then I'm in favor of removing it.

            Show
            tjenness Tim Jenness added a comment - If we aren't using it anywhere and it's getting in the way then I'm in favor of removing it.
            Hide
            salnikov Andy Salnikov added a comment -

            No objections, adopting without changes.

            Show
            salnikov Andy Salnikov added a comment - No objections, adopting without changes.
            Hide
            tjenness Tim Jenness added a comment -

            Andy Salnikov can you please add a triggering ticket for this RFC so we can track when the work has been implemented?

            Show
            tjenness Tim Jenness added a comment - Andy Salnikov can you please add a triggering ticket for this RFC so we can track when the work has been implemented?

              People

              Assignee:
              salnikov Andy Salnikov
              Reporter:
              salnikov Andy Salnikov
              Watchers:
              Andy Salnikov, Fritz Mueller, Hsin-Fang Chiang, John Parejko, Kian-Tat Lim, Krzysztof Findeisen, Russell Owen, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Planned End:

                  Jenkins

                  No builds found.