The class log_scope is an RAII-style class intended to make
it easy to notify a logger about entering and exiting the body of a
given function.
ana::log_scope::log_scope |
( |
logger * | logger, |
|
|
const char * | name ) |
|
inline |
The constructor for log_scope.
The normal case is that the logger is NULL, in which case this should
be largely a no-op.
If we do have a logger, notify it that we're entering the given scope.
We also need to hold a reference on it, to avoid a use-after-free
when logging the cleanup of the owner of the logger.
References m_logger, and m_name.
Referenced by DISABLE_COPY_AND_ASSIGN().