Apache Log4cxx: log4cxx::LoggerInstancePtr Class Reference (original) (raw)

A smart pointer (implicity convertable to LoggerPtr) that conditionally removes a Logger from the spi::LoggerRepository at the end of the instance variable's lifetime. More...

#include <[loggerinstance.h](loggerinstance%5F8h%5Fsource.html)>

Public Member Functions
LoggerInstancePtr ()
A null LoggerPtr.
template
LoggerInstancePtr (const StringType &instanceName)
A separately configurable logger named instanceName.
~LoggerInstancePtr ()
Conditionally remove the logger from the the spi::LoggerRepository.
const LoggerPtr & operator-> () const noexcept
operator bool () const noexcept
operator LoggerPtr & () noexcept
operator const LoggerPtr & () const noexcept
Logger * get () noexcept
const Logger * get () const noexcept
void reset ()
Conditionally remove the Logger from the spi::LoggerRepository.
template
void reset (const StringType &instanceName)
Change this to a logger named instanceName.

A smart pointer (implicity convertable to LoggerPtr) that conditionally removes a Logger from the spi::LoggerRepository at the end of the instance variable's lifetime.

If the configuration process loaded settings for the logger, or the logger is referenced elsewhere, the LoggerInstancePtr destructor will not remove it from the spi::LoggerRepository.

Use a LoggerInstancePtr to prevent unbounded growth of data in the spi::LoggerRepository when using runtime generated logger names.

A runtime generated logger name is a technique for marking logging messages that allows control of the logger level at a class instance level (i.e. a per object logger).

A per object logger is useful when the object instance has a identifiable name (e.g. when it is instantiated from configuration data).

log4cxx::LoggerInstancePtr::LoggerInstancePtr ( ) inline

A null LoggerPtr.

LoggerInstancePtr() [2/2]

template

log4cxx::LoggerInstancePtr::LoggerInstancePtr ( const StringType & instanceName) inline

A separately configurable logger named instanceName.

~LoggerInstancePtr()

log4cxx::LoggerInstancePtr::~LoggerInstancePtr ( ) inline

get() [1/2]

const Logger * log4cxx::LoggerInstancePtr::get ( ) const inlinenoexcept

get() [2/2]

Logger * log4cxx::LoggerInstancePtr::get ( ) inlinenoexcept

operator bool()

log4cxx::LoggerInstancePtr::operator bool ( ) const inlineexplicitnoexcept

operator const LoggerPtr &()

log4cxx::LoggerInstancePtr::operator const LoggerPtr & ( ) const inlinenoexcept

operator LoggerPtr &()

log4cxx::LoggerInstancePtr::operator LoggerPtr & ( ) inlinenoexcept

operator->()

const LoggerPtr & log4cxx::LoggerInstancePtr::operator-> ( ) const inlinenoexcept

reset() [1/2]

void log4cxx::LoggerInstancePtr::reset ( ) inline

reset() [2/2]

template

void log4cxx::LoggerInstancePtr::reset ( const StringType & instanceName) inline

Change this to a logger named instanceName.


The documentation for this class was generated from the following file: