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
I presume this also does not remove support for hierarchical logger names and thresholds.