Defines the minimum set of levels recognized by the system, that is OFF
, FATAL
, ERROR
, WARN
, INFO
, DEBUG
and ALL
.
More...
Inherits log4cxx::helpers::ObjectImpl.
Classes | |
class | LevelClass |
Public Types | |
enum | { OFF_INT = INT_MAX, FATAL_INT = 50000, ERROR_INT = 40000, WARN_INT = 30000, INFO_INT = 20000, DEBUG_INT = 10000, TRACE_INT = 5000, ALL_INT = INT_MIN } |
Public Member Functions | |
virtual const helpers::Class & | getClass () const |
const void * | cast (const helpers::Class &clazz) const |
bool | instanceof (const helpers::Class &clazz) const |
Level (int level, const LogString &name, int syslogEquivalent) | |
Instantiate a Level object. | |
void | toString (std::string &name) const |
Get the name of the level in the current encoding. | |
void | toString (std::wstring &name) const |
Get the name of the level. | |
void | toString (std::basic_string< UniChar > &name) const |
Get the name of the level. | |
void | toString (CFStringRef &name) const |
Get the name of the level. | |
LogString | toString () const |
Returns the string representation of this level. | |
virtual bool | equals (const LevelPtr &level) const |
Two levels are equal if their level fields are equal. | |
bool | operator== (const Level &level1) const |
bool | operator!= (const Level &level1) const |
int | getSyslogEquivalent () const |
Return the syslog equivalent of this level as an integer. | |
virtual bool | isGreaterOrEqual (const LevelPtr &level) const |
Returns true if this level has a higher or equal level than the level passed as argument, false otherwise. | |
int | toInt () const |
Returns the integer representation of this level. | |
Static Public Member Functions | |
static const helpers::Class & | getStaticClass () |
static const log4cxx::helpers::ClassRegistration & | registerClass () |
static LevelPtr | toLevel (const std::string &sArg) |
Convert the string passed as argument to a level. | |
static LevelPtr | toLevel (const std::string &sArg, const LevelPtr &defaultLevel) |
Convert the string passed as argument to a level. | |
static LevelPtr | toLevel (const std::wstring &sArg) |
Convert the string passed as argument to a level. | |
static LevelPtr | toLevel (const std::wstring &sArg, const LevelPtr &defaultLevel) |
Convert the string passed as argument to a level. | |
static LevelPtr | toLevel (const std::basic_string< UniChar > &sArg) |
Convert the string passed as argument to a level. | |
static LevelPtr | toLevel (const std::basic_string< UniChar > &sArg, const LevelPtr &defaultLevel) |
Convert the string passed as argument to a level. | |
static LevelPtr | toLevel (const CFStringRef &sArg) |
Convert the string passed as argument to a level. | |
static LevelPtr | toLevel (const CFStringRef &sArg, const LevelPtr &defaultLevel) |
Convert the string passed as argument to a level. | |
static LevelPtr | toLevelLS (const LogString &sArg) |
Convert the string passed as argument to a level. | |
static LevelPtr | toLevelLS (const LogString &sArg, const LevelPtr &defaultLevel) |
Convert the string passed as argument to a level. | |
static LevelPtr | toLevel (int val) |
Convert an integer passed as argument to a level. | |
static LevelPtr | toLevel (int val, const LevelPtr &defaultLevel) |
Convert an integer passed as argument to a level. | |
static LevelPtr | getAll () |
static LevelPtr | getFatal () |
static LevelPtr | getError () |
static LevelPtr | getWarn () |
static LevelPtr | getInfo () |
static LevelPtr | getDebug () |
static LevelPtr | getTrace () |
static LevelPtr | getOff () |
Defines the minimum set of levels recognized by the system, that is OFF
, FATAL
, ERROR
, WARN
, INFO
, DEBUG
and ALL
.
The Level
class may be subclassed to define a larger level set.
anonymous enum |
const void* cast | ( | const helpers::Class & | clazz | ) | const [inline, virtual] |
Implements Object.
virtual bool equals | ( | const LevelPtr & | level | ) | const [virtual] |
Two levels are equal if their level fields are equal.
static LevelPtr getAll | ( | ) | [static] |
virtual const helpers::Class& getClass | ( | ) | const [virtual] |
Reimplemented from Object.
static LevelPtr getDebug | ( | ) | [static] |
static LevelPtr getError | ( | ) | [static] |
static LevelPtr getFatal | ( | ) | [static] |
static LevelPtr getInfo | ( | ) | [static] |
static LevelPtr getOff | ( | ) | [static] |
static const helpers::Class& getStaticClass | ( | ) | [static] |
Reimplemented from Object.
int getSyslogEquivalent | ( | ) | const [inline] |
Return the syslog equivalent of this level as an integer.
static LevelPtr getTrace | ( | ) | [static] |
static LevelPtr getWarn | ( | ) | [static] |
bool instanceof | ( | const helpers::Class & | clazz | ) | const [inline, virtual] |
Implements Object.
virtual bool isGreaterOrEqual | ( | const LevelPtr & | level | ) | const [virtual] |
Returns true
if this level has a higher or equal level than the level passed as argument, false
otherwise.
You should think twice before overriding the default implementation of isGreaterOrEqual
method.
bool operator!= | ( | const Level & | level1 | ) | const [inline] |
bool operator== | ( | const Level & | level1 | ) | const [inline] |
static const log4cxx::helpers::ClassRegistration& registerClass | ( | ) | [static] |
Reimplemented from Object.
int toInt | ( | ) | const [inline] |
Returns the integer representation of this level.
static LevelPtr toLevel | ( | const std::wstring & | sArg | ) | [static] |
Convert the string passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
sArg | level name. |
Convert the string passed as argument to a level.
If the conversion fails, then this method returns the value of defaultLevel
.
sArg | level name. | |
defaultLevel | level to return if no match. |
static LevelPtr toLevel | ( | int | val | ) | [static] |
Convert an integer passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
static LevelPtr toLevel | ( | const CFStringRef & | sArg, | |
const LevelPtr & | defaultLevel | |||
) | [static] |
Convert the string passed as argument to a level.
If the conversion fails, then this method returns the value of defaultLevel
.
sArg | level name. | |
defaultLevel | level to return if no match. |
static LevelPtr toLevel | ( | const CFStringRef & | sArg | ) | [static] |
Convert the string passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
sArg | level name. |
static LevelPtr toLevel | ( | const std::basic_string< UniChar > & | sArg, | |
const LevelPtr & | defaultLevel | |||
) | [static] |
Convert the string passed as argument to a level.
If the conversion fails, then this method returns the value of defaultLevel
.
sArg | level name. | |
defaultLevel | level to return if no match. |
Convert an integer passed as argument to a level.
If the conversion fails, then this method returns the specified default.
static LevelPtr toLevel | ( | const std::string & | sArg | ) | [static] |
Convert the string passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
sArg | level name. |
Convert the string passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
sArg | level name. |
Convert the string passed as argument to a level.
If the conversion fails, then this method returns the value of defaultLevel
.
sArg | level name. | |
defaultLevel | level to return if no match. |
Convert the string passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
sArg | level name. |
Convert the string passed as argument to a level.
If the conversion fails, then this method returns the value of defaultLevel
.
sArg | level name. | |
defaultLevel | level to return if no match. |
void toString | ( | CFStringRef & | name | ) | const |
Get the name of the level.
name | buffer to which name is appended. |
void toString | ( | std::basic_string< UniChar > & | name | ) | const |
Get the name of the level.
name | buffer to which name is appended. |
void toString | ( | std::string & | name | ) | const |
Get the name of the level in the current encoding.
name | buffer to which name is appended. |
LogString toString | ( | ) | const |
Returns the string representation of this level.
void toString | ( | std::wstring & | name | ) | const |
Get the name of the level.
name | buffer to which name is appended. |