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