Log4g Reference Manual | ||||
---|---|---|---|---|
Top | Description |
Log4gAppender; Log4gAppenderClass; void log4g_appender_clear_filters (Log4gAppender *self
); void log4g_appender_add_filter (Log4gAppender *self
,Log4gFilter *filter
); Log4gFilter * log4g_appender_get_filter (Log4gAppender *self
); void log4g_appender_close (Log4gAppender *self
); void log4g_appender_do_append (Log4gAppender *self
,Log4gLoggingEvent *event
); const gchar * log4g_appender_get_name (Log4gAppender *self
); void log4g_appender_set_error_handler (Log4gAppender *self
,gpointer handler
); gpointer log4g_appender_get_error_handler (Log4gAppender *self
); void log4g_appender_set_layout (Log4gAppender *self
,Log4gLayout *layout
); Log4gLayout * log4g_appender_get_layout (Log4gAppender *self
); void log4g_appender_set_name (Log4gAppender *self
,const gchar *name
); gboolean log4g_appender_requires_layout (Log4gAppender *self
); void log4g_appender_activate_options (Log4gAppender *self
); void log4g_appender_append (Log4gAppender *self
,Log4gLoggingEvent *event
); Log4gFilter * log4g_appender_get_first_filter (Log4gAppender *self
); gboolean log4g_appender_is_as_severe_as (Log4gAppender *self
,Log4gLevel *level
); void log4g_appender_set_threshold (Log4gAppender *self
,const gchar *threshold
); Log4gLevel * log4g_appender_get_threshold (Log4gAppender *self
); gboolean log4g_appender_get_closed (Log4gAppender *self
); void log4g_appender_set_closed (Log4gAppender *self
,gboolean closed
); void (*Log4gAppenderAddFilter) (Log4gAppender *self
,Log4gFilter *filter
); Log4gFilter (*Log4gAppenderGetFilter) (Log4gAppender *self
); void (*Log4gAppenderClose) (Log4gAppender *self
); void (*Log4gAppenderAppend) (Log4gAppender *base
,Log4gLoggingEvent *event
); void (*Log4gAppenderDoAppend) (Log4gAppender *self
,Log4gLoggingEvent *event
); void (*Log4gAppenderSetName) (Log4gAppender *self
,const gchar *name
); const gchar (*Log4gAppenderGetName) (Log4gAppender *self
); void (*Log4gAppenderSetErrorHandler) (Log4gAppender *self
,gpointer handler
); gpointer (*Log4gAppenderGetErrorHandler) (Log4gAppender *self
); void (*Log4gAppenderSetLayout) (Log4gAppender *self
,Log4gLayout *layout
); Log4gLayout (*Log4gAppenderGetLayout) (Log4gAppender *self
); gboolean (*Log4gAppenderRequiresLayout) (Log4gAppender *self
); void (*Log4gAppenderActivateOptions) (Log4gAppender *self
);
typedef struct { } Log4gAppender;
The Log4gAppender structure does not have any public members.
typedef struct { Log4gAppenderAddFilter add_filter; Log4gAppenderGetFilter get_filter; Log4gAppenderClose close; Log4gAppenderAppend append; Log4gAppenderDoAppend do_append; Log4gAppenderSetName set_name; Log4gAppenderGetName get_name; Log4gAppenderSetErrorHandler set_error_handler; Log4gAppenderGetErrorHandler get_error_handler; Log4gAppenderSetLayout set_layout; Log4gAppenderGetLayout get_layout; Log4gAppenderRequiresLayout requires_layout; Log4gAppenderActivateOptions activate_options; } Log4gAppenderClass;
Log4gAppenderAddFilter |
Add a filter to the end of the filter chain. |
Log4gAppenderGetFilter |
Get the first filter in the filter chain. |
Log4gAppenderClose |
Release all resources. |
Log4gAppenderAppend |
Perform actial logging. |
Log4gAppenderDoAppend |
Log in an appender-specific way. |
Log4gAppenderSetName |
Set the name of this appender. |
Log4gAppenderGetName |
Retrieve the name of this appender. |
Log4gAppenderSetErrorHandler |
Set the error handler for this appender. |
Log4gAppenderGetErrorHandler |
Retrieve the error handler for this appender. |
Log4gAppenderSetLayout |
Set the layout for this appender. |
Log4gAppenderGetLayout |
Get the layout for this appender. |
Log4gAppenderRequiresLayout |
Determine if this appender requires a layout. |
Log4gAppenderActivateOptions |
Activate all options set for this appender. |
void log4g_appender_clear_filters (Log4gAppender *self
);
Remove all filters attached to this appender.
|
A Log4gAppender object. |
Since 0.1
void log4g_appender_add_filter (Log4gAppender *self
,Log4gFilter *filter
);
Calls the add_filter
function from the Log4gAppenderClass of self
.
|
A Log4gAppender object. |
|
A filter to add to self .
|
Since 0.1
Log4gFilter * log4g_appender_get_filter (Log4gAppender *self
);
Calls the get_filter
function from the Log4gAppenderClass of self
.
|
A Log4gAppender object. |
Returns : |
The first filter in the filter chain. |
Since 0.1
void log4g_appender_close (Log4gAppender *self
);
Calls the close
function from the Log4gAppenderClass of self
.
|
A Log4gAppender object. |
Since 0.1
void log4g_appender_do_append (Log4gAppender *self
,Log4gLoggingEvent *event
);
Calls the do_append
function from the Log4gAppenderClass of self
.
|
A Log4gAppender object. |
|
The log event to append. |
Since 0.1
const gchar * log4g_appender_get_name (Log4gAppender *self
);
Calls the get_name
function from the Log4gAppenderClass of self
.
|
A Log4gAppender object. |
Returns : |
The name of self (may be NULL ).
|
Since 0.1
void log4g_appender_set_error_handler (Log4gAppender *self
,gpointer handler
);
Calls the set_error_handler
function from the Log4gAppenderClass of self
.
|
A Log4gAppender object. |
|
The new error handler object for self .
|
Since 0.1
gpointer log4g_appender_get_error_handler (Log4gAppender *self
);
Calls the get_error_handler
function from the Log4gAppenderClass of self
.
|
A Log4gAppender object. |
Returns : |
The error handler object used by self .
|
Since 0.1
void log4g_appender_set_layout (Log4gAppender *self
,Log4gLayout *layout
);
Calls the set_layout
function from the Log4gAppenderClass of self
.
|
A Log4gAppender object. |
|
The new layout for self .
|
Since 0.1
Log4gLayout * log4g_appender_get_layout (Log4gAppender *self
);
Calls the get_layout
function from the Log4gAppenderClass of self
.
|
A Log4gAppender object. |
Returns : |
The layout set for self .
|
Since 0.1
void log4g_appender_set_name (Log4gAppender *self
,const gchar *name
);
Calls the set_name
function from the Log4gAppenderClass of self
.
|
A Log4gAppender object. |
|
The new name for this appender. |
Since 0.1
gboolean log4g_appender_requires_layout (Log4gAppender *self
);
Calls the requires_layout
function from the Log4gAppenderClass of self
.
|
A Log4gAppender object. |
Since 0.1
void log4g_appender_activate_options (Log4gAppender *self
);
Calls the activate_options
function from the Log4gAppenderClass of self
.
|
A Log4gAppender object. |
Since 0.1
void log4g_appender_append (Log4gAppender *self
,Log4gLoggingEvent *event
);
Calls the append
function from the Log4gAppenderClass of self
.
|
A Log4gAppender object. |
|
A log event. |
Since 0.1
Log4gFilter * log4g_appender_get_first_filter (Log4gAppender *self
);
Retrieve the first filter in the filter chain.
|
A Log4gAppender object. |
Returns : |
The first filter in the filter chain, or NULL if there is none.
|
Since 0.1
gboolean log4g_appender_is_as_severe_as (Log4gAppender *self
,Log4gLevel *level
);
Determine if a log level is below the appender's threshold.
If there is no threshold set then the return value is always TRUE
.
|
A Log4gAppender object. |
|
A log level. |
Returns : |
TRUE if level is above the level threshold of this appender,
FALSE otherwise.
|
Since 0.1
void log4g_appender_set_threshold (Log4gAppender *self
,const gchar *threshold
);
Set the threshold property for this appender.
|
A Log4gAppender object. |
|
A string representation of a log level. |
Since 0.1
Log4gLevel * log4g_appender_get_threshold (Log4gAppender *self
);
Retrieve the threshold property.
|
A Log4gAppender object. |
Returns : |
The threshold value for this appender. |
Since 0.1
gboolean log4g_appender_get_closed (Log4gAppender *self
);
Determine if an appender has been closed.
|
A Log4gAppender object. |
Returns : |
TRUE if this appender is closed, FALSE otherwise.
|
Since 0.1
void log4g_appender_set_closed (Log4gAppender *self
,gboolean closed
);
Set the closed parameter.
Appenders should set this value appropriately. The default value is FALSE
.
|
A Log4gAppender object. |
|
The new closed value for self .
|
Returns : |
TRUE if this appender is closed, FALSE otherwise.
|
Since 0.1
void (*Log4gAppenderAddFilter) (Log4gAppender *self
,Log4gFilter *filter
);
Add a filter to the end of the filter chain.
See
: Log4gFilter
|
A Log4gAppender object. |
|
A Log4gFilter to add to this appender. |
Since 0.1
Log4gFilter (*Log4gAppenderGetFilter) (Log4gAppender *self
);
Filters are organized in a linked list so all filters are available through the result of this function.
See
: Log4gFilter
|
A Log4gAppender object. |
Returns : |
The first filter in the filter chain. |
Since 0.1
void (*Log4gAppenderClose) (Log4gAppender *self
);
Release any resources allocated within the appender such as file handles, network connections, etc. A closed appender is no longer usable by the Log4g system.
|
A Log4gAppender object. |
Since 0.1
void (*Log4gAppenderAppend) (Log4gAppender *base
,Log4gLoggingEvent *event
);
Sub-classes should implement this abstract virtual function to perform actual logging.
See
: Log4gLoggingEvent
|
An Log4gAppender object. |
|
A log event. |
Since 0.1
void (*Log4gAppenderDoAppend) (Log4gAppender *self
,Log4gLoggingEvent *event
);
Loggers will call this function in order to log events.
See
: Log4gLoggingEvent
|
A Log4gAppender object. |
|
The logging event to append. |
Since 0.1
void (*Log4gAppenderSetName) (Log4gAppender *self
,const gchar *name
);
The name may be used by other components to uniquely identify the appender.
|
A Log4gAppender object. |
|
The new name for this appender. |
Since 0.1
const gchar (*Log4gAppenderGetName) (Log4gAppender *self
);
The name uniquely identifies this appender.
|
A Log4gAppender object. |
Returns : |
The name of self (may be NULL ).
|
Since 0.1
void (*Log4gAppenderSetErrorHandler) (Log4gAppender *self
,gpointer handler
);
Set the error handler for this appender.
See
: Log4gErrorHandler
|
An appender object. |
|
An error handler. |
Since 0.1
gpointer (*Log4gAppenderGetErrorHandler) (Log4gAppender *self
);
Retrieve the error handler for an appender.
See
: Log4gErrorHandler
|
A Log4gAppender object. |
Returns : |
The error handler set for this appender. |
Since 0.1
void (*Log4gAppenderSetLayout) (Log4gAppender *self
,Log4gLayout *layout
);
Set the layout for this appender.
See
: Log4gLayout
|
A Log4gAppender object. |
|
The new layout for this appender. |
Since 0.1
Log4gLayout (*Log4gAppenderGetLayout) (Log4gAppender *self
);
Retrieve the layout for this appender.
See
: Log4gLayout
|
A Log4gAppender object. |
Returns : |
The layout for this appender; |
Since 0.1
gboolean (*Log4gAppenderRequiresLayout) (Log4gAppender *self
);
Configurators may call this method to determine if an appender requires a layout.
In the exceptional case where an appender accepts a layout but can also
work without it the appender should return TRUE
.
See
: Log4gAppenderSetLayout, Log4gAppenderGetLayout, Log4gLayout
|
A Log4gAppender object. |
Returns : |
TRUE if this appender requires a layout, FALSE otherwise.
|
Since 0.1
void (*Log4gAppenderActivateOptions) (Log4gAppender *self
);
Activate all options set for this appender.
|
A Log4gAppender object. |
Since 0.1