Log4g Reference Manual | ||||
---|---|---|---|---|
Top | Description |
Log4gLevel; Log4gLevelClass; enum Log4gLevelInt; Log4gLevel * log4g_level_new (gint level
,const gchar *string
,gint syslog
); gboolean log4g_level_equals (Log4gLevel *self
,Log4gLevel *level
); gint log4g_level_get_syslog_equivalent (Log4gLevel *self
); gboolean log4g_level_is_greater_or_equal (Log4gLevel *self
,Log4gLevel *level
); const gchar * log4g_level_to_string (Log4gLevel *self
); gint log4g_level_to_int (Log4gLevel *self
); Log4gLevel * log4g_level_string_to_level (const gchar *string
); Log4gLevel * log4g_level_string_to_level_default (const gchar *string
,Log4gLevel *def
); Log4gLevel * log4g_level_int_to_level (gint level
); Log4gLevel * log4g_level_int_to_level_default (gint level
,Log4gLevel *def
); Log4gLevel * log4g_level_ALL (void
); Log4gLevel * log4g_level_TRACE (void
); Log4gLevel * log4g_level_DEBUG (void
); Log4gLevel * log4g_level_INFO (void
); Log4gLevel * log4g_level_WARN (void
); Log4gLevel * log4g_level_ERROR (void
); Log4gLevel * log4g_level_FATAL (void
); Log4gLevel * log4g_level_OFF (void
); Log4gLevel (*Log4gLevelStringToLevel) (const gchar *level
); Log4gLevel (*Log4gLevelStringToLevelDefault) (const gchar *level
,Log4gLevel *def
); Log4gLevel (*Log4gLevelIntToLevel) (gint level
); Log4gLevel (*Log4gLevelIntToLevelDefault) (gint level
,Log4gLevel *def
);
The following base log levels are defined:
OFF
FATAL
ERROR
WARN
INFO
DEBUG
ALL
The Log4gLevel class may be sub-classed to define a larger level set.
typedef struct { } Log4gLevel;
The Log4gLevel structure does not have any public members.
typedef struct { Log4gLevelStringToLevel string_to_level; Log4gLevelStringToLevelDefault string_to_level_default; Log4gLevelIntToLevel int_to_level; Log4gLevelIntToLevelDefault int_to_level_default; Log4gLevel *ALL; Log4gLevel *TRACE; Log4gLevel *DEBUG; Log4gLevel *INFO; Log4gLevel *WARN; Log4gLevel *ERROR; Log4gLevel *FATAL; Log4gLevel *OFF; } Log4gLevelClass;
Log4gLevelStringToLevel |
Convert a string passed as an argument to a level. |
Log4gLevelStringToLevelDefault |
Convert a string passed as an argument to a level. |
Log4gLevelIntToLevel |
Convert an integer passed as an argument to a level. |
Log4gLevelIntToLevelDefault |
Convert an integer passed as an argument to a level. |
Log4gLevel * |
Has the lowest possible rank and is intended to turn on all logging. |
Log4gLevel * |
Indicates finer-grained information than Log4gLevelClass.DEBUG. |
Log4gLevel * |
Indicates fine-grained events that are useful for debugging. |
Log4gLevel * |
Indicates messages that highlight the progress of the application at a coarse-grained level. |
Log4gLevel * |
Indicates potentially harmful situations. |
Log4gLevel * |
Indicates an error event that may allow the application to continue. |
Log4gLevel * |
Indicates a very severe error that will presumably lead the application to abort. |
Log4gLevel * |
Has the highest possible rank and is intended to turn off logging. |
typedef enum { LOG4G_LEVEL_ALL_INT = G_MININT, LOG4G_LEVEL_TRACE_INT = 5000, LOG4G_LEVEL_DEBUG_INT = 10000, LOG4G_LEVEL_INFO_INT = 20000, LOG4G_LEVEL_WARN_INT = 30000, LOG4G_LEVEL_ERROR_INT = 40000, LOG4G_LEVEL_FATAL_INT = 50000, LOG4G_LEVEL_OFF_INT = G_MAXINT } Log4gLevelInt;
ALL level integer value | |
TRACE level integer value | |
DEBUG level integer value | |
INFO level integer value | |
WARN level integer value | |
ERROR level integer value | |
FATAL level integer value | |
OFF level integer value |
Log4gLevel * log4g_level_new (gint level
,const gchar *string
,gint syslog
);
Create a Log4gLevel object.
|
The log priority. |
|
The string representation of this level. |
|
The syslog equivalent of this level. |
Returns : |
A new Log4gLevel object. |
Since 0.1
gboolean log4g_level_equals (Log4gLevel *self
,Log4gLevel *level
);
Determine if two log levels are equal.
|
A level object. |
|
A level to compare with self .
|
Returns : |
TRUE if self & level are equal, FALSE otherwise.
|
Since 0.1
gint log4g_level_get_syslog_equivalent (Log4gLevel *self
);
Retrieve the syslog(3) equivalent integer of level object.
|
A level object. |
Returns : |
The syslog equivalent integer of self .
|
Since 0.1
gboolean log4g_level_is_greater_or_equal (Log4gLevel *self
,Log4gLevel *level
);
Determine if a level is greater or equal than another level.
|
A level object. |
|
A level object to compare with self .
|
Returns : |
TRUE if level is greater than or equal to self , or FALSE if
self is greater than level .
|
Since 0.1
const gchar * log4g_level_to_string (Log4gLevel *self
);
Retrieve the string representation of a level.
|
A level object. |
Returns : |
The string representation of self .
|
gint log4g_level_to_int (Log4gLevel *self
);
Retrieve the integer representation of a level.
|
A level object. |
Returns : |
The integer representation of self .
|
Since 0.1
Log4gLevel * log4g_level_string_to_level (const gchar *string
);
Calls the string_to_level
function from the Log4gLevelClass of self
.
|
A string representation of a level. |
Returns : |
The level represented by string .
|
Since 0.1
Log4gLevel * log4g_level_string_to_level_default (const gchar *string
,Log4gLevel *def
);
Calls the string_to_level_default
function of the Log4gLevelClass of
self
.
|
A string representation of a level. |
|
The level to return if the conversion failed. |
Returns : |
The level represented by string or def if the conversion failed.
|
Since 0.1
Log4gLevel * log4g_level_int_to_level (gint level
);
Calls the int_to_level
function from the Log4gLevelClass of self
.
|
An integer representation of a level. |
Returns : |
The level represented by level .
|
Since 0.1
Log4gLevel * log4g_level_int_to_level_default (gint level
,Log4gLevel *def
);
Calls the int_to_level_default
from the Log4gLevelClass of self
.
|
An integer representation of a level. |
|
The level to return if the conversion failed. |
Returns : |
The level represented by level or def if the conversion failed.
|
Since 0.1
Log4gLevel * log4g_level_ALL (void
);
Retrieve the log level Log4gLevelClass.ALL.
Returns : |
The log level Log4gLevelClass.ALL. |
Since 0.1
Log4gLevel * log4g_level_TRACE (void
);
Retrieve the log level Log4gLevelClass.TRACE.
Returns : |
The log level Log4gLevelClass.TRACE. |
Since 0.1
Log4gLevel * log4g_level_DEBUG (void
);
Retrieve the log level Log4gLevelClass.DEBUG.
Returns : |
The log level Log4gLevelClass.DEBUG. |
Since 0.1
Log4gLevel * log4g_level_INFO (void
);
Retrieve the log level Log4gLevelClass.INFO.
Returns : |
The log level Log4gLevelClass.INFO. |
Since 0.1
Log4gLevel * log4g_level_WARN (void
);
Retrieve the log level Log4gLevelClass.WARN.
Returns : |
The log level Log4gLevelClass.WARN. |
Since 0.1
Log4gLevel * log4g_level_ERROR (void
);
Retrieve the log level Log4gLevelClass.ERROR.
Returns : |
The log level Log4gLevelClass.ERROR. |
Since 0.1
Log4gLevel * log4g_level_FATAL (void
);
Retrieve the log level Log4gLevelClass.FATAL.
Returns : |
The log level Log4gLevelClass.FATAL. |
Since 0.1
Log4gLevel * log4g_level_OFF (void
);
Retrieve the log level Log4gLevelClass.OFF.
Returns : |
The log level Log4gLevelClass.OFF. |
Since 0.1
Log4gLevel (*Log4gLevelStringToLevel) (const gchar *level
);
Convert a string passed as an argument to a level.
|
A string representation of a level. |
Returns : |
The level represented by string or DEBUG if the conversion failed.
|
Since 0.1
Log4gLevel (*Log4gLevelStringToLevelDefault) (const gchar *level
,Log4gLevel *def
);
Convert a string passed as an argument to a level.
|
A string representation of a level. |
|
The level to return if the conversion fails. |
Returns : |
The level represented by string or def if the conversion failed.
|
Since 0.1
Log4gLevel (*Log4gLevelIntToLevel) (gint level
);
Convert an integer passed as an argument to a level.
|
An integer representation of a level. |
Returns : |
The level represented by level or DEBUG if the conversion failed.
|
Since 0.1
Log4gLevel (*Log4gLevelIntToLevelDefault) (gint level
,Log4gLevel *def
);
Convert an integer passed as an argument to a level.
|
An integer representation of a level. |
|
The level to return if the conversion fails. |
Returns : |
The level represented by level or def if the conversion failed.
|
Since 0.1