Log4g Reference Manual | ||||
---|---|---|---|---|
Top | Description |
Log4gWriterAppender; Log4gWriterAppenderClass; gboolean log4g_writer_appender_check_entry_conditions (Log4gAppender *base
); void log4g_writer_appender_close_writer (Log4gAppender *base
); Log4gQuietWriter * log4g_writer_appender_get_quiet_writer (Log4gAppender *base
); void log4g_writer_appender_reset (Log4gAppender *base
); void log4g_writer_appender_set_quiet_writer (Log4gAppender *base
,Log4gQuietWriter *writer
); void log4g_writer_appender_set_writer (Log4gAppender *base
,FILE *file
); void log4g_writer_appender_sub_append (Log4gAppender *base
,Log4gLoggingEvent *event
); void log4g_writer_appender_write_footer (Log4gAppender *base
); void log4g_writer_appender_write_header (Log4gAppender *base
); void (*Log4gWriterAppenderCloseWriter) (Log4gAppender *base
); void (*Log4gWriterAppenderReset) (Log4gAppender *base
); void (*Log4gWriterAppenderSubAppend) (Log4gAppender *base
,Log4gLoggingEvent *event
);
This class is a base class for appenders that write to stdio(3) streams.
Writer appenders accept one property:
immediate-flush
The value of immediate-flush determines if the I/O stream will be flushed
after each write. The default value is TRUE
.
typedef struct { Log4gWriterAppenderSubAppend sub_append; Log4gWriterAppenderCloseWriter close_writer; Log4gWriterAppenderReset reset; } Log4gWriterAppenderClass;
Log4gWriterAppenderSubAppend |
Actual writing occurs here. |
Log4gWriterAppenderCloseWriter |
Close the underlying stream. |
Log4gWriterAppenderReset |
Clear internal references and variables. |
gboolean log4g_writer_appender_check_entry_conditions
(Log4gAppender *base
);
Determine if it is OK to append.
Checks the following conditions:
The output target is set
The layout is set
|
A writer appender object. |
Returns : |
TRUE if all entry conditions pass, FALSE otherwise.
|
Since 0.1
void log4g_writer_appender_close_writer (Log4gAppender *base
);
Calls the close_writer
function from the Log4gWriterAppender of self
.
|
A writer appender object. |
Since 0.1
Log4gQuietWriter * log4g_writer_appender_get_quiet_writer
(Log4gAppender *base
);
Retrieve the current quiet writer object.
|
A writer appender object. |
Returns : |
The current quiet writer object used by base .
|
Since 0.1
void log4g_writer_appender_reset (Log4gAppender *base
);
Calls the reset
function from the Log4gWriterAppender of self
.
|
A writer appender object. |
Since 0.1
void log4g_writer_appender_set_quiet_writer (Log4gAppender *base
,Log4gQuietWriter *writer
);
Set the quiet writer to use.
|
A writer appender object. |
|
A quiet writer. |
Since 0.1
void log4g_writer_appender_set_writer (Log4gAppender *base
,FILE *file
);
Set the stdio(3) stream to use.
See
: stdio(3)
|
A writer appender object. |
|
An open stdio(3) stream. |
Since 0.1
void log4g_writer_appender_sub_append (Log4gAppender *base
,Log4gLoggingEvent *event
);
Calls the sub_append
function from the Log4gWriterAppender of self
.
|
A writer appender object. |
|
The log event to append. |
Since 0.1
void log4g_writer_appender_write_footer (Log4gAppender *base
);
Write the layout footer.
|
A writer appender object. |
Since 0.1
void log4g_writer_appender_write_header (Log4gAppender *base
);
Write the layout header.
|
A writer appender object. |
Since 0.1
void (*Log4gWriterAppenderCloseWriter) (Log4gAppender *base
);
Close the underlying stdio(3) stream.
|
A writer appender object. |
Since 0.1
void (*Log4gWriterAppenderReset) (Log4gAppender *base
);
Clear internal references to the writer and other variables.
Subclasses can override this method for alternate closing behavior.
|
A writer appender object. |
Since 0.1
void (*Log4gWriterAppenderSubAppend) (Log4gAppender *base
,Log4gLoggingEvent *event
);
Actual writing occurs here.
Most subclasses of writer appender will need to override this method.
|
A writer appender object. |
|
The log event to append. |
Since 0.1