Apache log4cxx  Version 0.12.0
log4cxx::pattern::NameAbbreviator Class Referenceabstract

NameAbbreviator generates abbreviated logger and class names. More...

#include <nameabbreviator.h>

Inheritance diagram for log4cxx::pattern::NameAbbreviator:

Public Member Functions

virtual ~NameAbbreviator ()
virtual void abbreviate (LogString::size_type nameStart, LogString &buf) const =0
 Abbreviates a name in a StringBuffer. More...
- Public Member Functions inherited from log4cxx::helpers::Object
virtual ~Object ()
virtual bool instanceof (const Class &clazz) const =0
virtual const void * cast (const Class &clazz) const =0

Static Public Member Functions

static NameAbbreviatorPtr getAbbreviator (const LogString &pattern)
 Gets an abbreviator. More...
static NameAbbreviatorPtr getDefaultAbbreviator ()
 Gets default abbreviator. More...

Protected Member Functions

 NameAbbreviator ()

Detailed Description

NameAbbreviator generates abbreviated logger and class names.

Constructor & Destructor Documentation

◆ NameAbbreviator()

log4cxx::pattern::NameAbbreviator::NameAbbreviator ( )

◆ ~NameAbbreviator()

virtual log4cxx::pattern::NameAbbreviator::~NameAbbreviator ( )

Member Function Documentation

◆ abbreviate()

virtual void log4cxx::pattern::NameAbbreviator::abbreviate ( LogString::size_type  nameStart,
LogString buf 
) const
pure virtual

Abbreviates a name in a StringBuffer.

nameStartstarting position of name in buf.
bufbuffer, may not be null.

◆ getAbbreviator()

static NameAbbreviatorPtr log4cxx::pattern::NameAbbreviator::getAbbreviator ( const LogString pattern)

Gets an abbreviator.

For example, "%logger{2}" will output only 2 elements of the logger name, "%logger{1.}" will output only the first character of the non-final elements in the name, "logger(1~.2~} will output the first character of the first element, two characters of the second and subsequent elements and will use a tilde to indicate abbreviated characters.

patternabbreviation pattern.
abbreviator, will not be null.

◆ getDefaultAbbreviator()

static NameAbbreviatorPtr log4cxx::pattern::NameAbbreviator::getDefaultAbbreviator ( )

Gets default abbreviator.

default abbreviator.

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