NameAbbreviator Class Reference

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

Inherits log4cxx::helpers::ObjectImpl.

List of all members.

Classes

class  ClazzNameAbbreviator

Public Member Functions

virtual const helpers::ClassgetClass () const
const void * cast (const helpers::Class &clazz) const
bool instanceof (const helpers::Class &clazz) const
virtual ~NameAbbreviator ()
virtual void abbreviate (LogString::size_type nameStart, LogString &buf) const =0
 Abbreviates a name in a StringBuffer.

Static Public Member Functions

static const helpers::ClassgetStaticClass ()
static const
log4cxx::helpers::ClassRegistration
registerClass ()
static NameAbbreviatorPtr getAbbreviator (const LogString &pattern)
 Gets an abbreviator.
static NameAbbreviatorPtr getDefaultAbbreviator ()
 Gets default abbreviator.

Protected Member Functions

 NameAbbreviator ()

Detailed Description

NameAbbreviator generates abbreviated logger and class names.


Constructor & Destructor Documentation

NameAbbreviator (  )  [protected]
virtual ~NameAbbreviator (  )  [virtual]

Member Function Documentation

virtual void abbreviate ( LogString::size_type  nameStart,
LogString buf 
) const [pure virtual]

Abbreviates a name in a StringBuffer.

Parameters:
nameStart starting position of name in buf.
buf buffer, may not be null.
const void* cast ( const helpers::Class clazz  )  const [inline, virtual]

Implements Object.

static NameAbbreviatorPtr getAbbreviator ( const LogString pattern  )  [static]

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.

Parameters:
pattern abbreviation pattern.
Returns:
abbreviator, will not be null.
virtual const helpers::Class& getClass (  )  const [virtual]

Reimplemented from Object.

static NameAbbreviatorPtr getDefaultAbbreviator (  )  [static]

Gets default abbreviator.

Returns:
default abbreviator.
static const helpers::Class& getStaticClass (  )  [static]

Reimplemented from Object.

bool instanceof ( const helpers::Class clazz  )  const [inline, virtual]

Implements Object.

static const log4cxx::helpers::ClassRegistration& registerClass (  )  [static]

Reimplemented from Object.


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