Log4g Reference Manual | ||||
---|---|---|---|---|
Top | Description |
Log4gFileAppender; Log4gFileAppenderClass; void log4g_file_appender_close_file (Log4gAppender *base
); guint log4g_file_appender_get_buffer_size (Log4gAppender *base
); gboolean log4g_file_appender_get_buffered_io (Log4gAppender *base
); const gchar * log4g_file_appender_get_file (Log4gAppender *base
); void log4g_file_appender_set_file_full (Log4gAppender *base
,const gchar *file
,gboolean append
,gboolean buffered
,guint size
); void log4g_file_appender_set_qw_for_files (Log4gAppender *base
,FILE *file
); void (*Log4gFileAppenderSetFileFull) (Log4gAppender *base
,const gchar *file
,gboolean append
,gboolean buffered
,guint size
); void (*Log4gFileAppenderSetQwForFiles) (Log4gAppender *base
,FILE *file
);
The file appender logs events to a regular text file.
File appenders accept the following properties:
file
append
buffered-io
buffer-size
The value of file specifies the location of the output. This may be an absolute or relative path.
The value of append determines if the file will be truncated when it is
opened for writing. The default value is TRUE
(i.e. do not truncate).
The value of buffered-io determines if file I/O will be buffered. Buffered I/O may exhibit improved performance, however messages in the buffer will be lost if your application crashes. Buffering is turned off by default.
The buffer-size property controls the size of the I/O buffer. The default value is eight kilobytes (8192 bytes).
typedef struct { } Log4gFileAppender;
The Log4gFileAppender structure does not have any public members.
typedef struct { Log4gFileAppenderSetFileFull set_file_full; Log4gFileAppenderSetQwForFiles set_qw_for_files; } Log4gFileAppenderClass;
Log4gFileAppenderSetFileFull |
Set the file and other options. |
Log4gFileAppenderSetQwForFiles |
Set the quiet writer used for output. |
void log4g_file_appender_close_file (Log4gAppender *base
);
Close the log file.
Once a file appender is closed it is no longer usable.
|
A file appender object. |
Since 0.1
guint log4g_file_appender_get_buffer_size (Log4gAppender *base
);
Retrieve the buffer-size property.
|
A file appender object. |
Returns : |
The buffer-size value for \e base. |
Since 0.1
gboolean log4g_file_appender_get_buffered_io (Log4gAppender *base
);
Retrieve the buffered-io property.
|
A file appender object. |
Returns : |
The buffered-io value for \e base. |
Since 0.1
const gchar * log4g_file_appender_get_file (Log4gAppender *base
);
Retrieve the file property.
|
A file appender object. |
Returns : |
The name of the file being appended to. |
Since 0.1
void log4g_file_appender_set_file_full (Log4gAppender *base
,const gchar *file
,gboolean append
,gboolean buffered
,guint size
);
Calls the set_file_full
function from the Log4gFileAppender of self
.
|
A file appender object. |
|
The new value for the file property. |
|
The new value for the append property. |
|
The new value for the buffered-io property. |
|
The new value for the size property. |
Since 0.1
void log4g_file_appender_set_qw_for_files (Log4gAppender *base
,FILE *file
);
Calls the set_qw_for_files
function from the Log4gFileAppenderClass
of self
.
|
A file appender object. |
|
An open file descriptor. |
Since 0.1
void (*Log4gFileAppenderSetFileFull) (Log4gAppender *base
,const gchar *file
,gboolean append
,gboolean buffered
,guint size
);
The rolling file appender overloads this function.
|
A file appender object. |
|
The new value for the file property. |
|
The new value for the append property. |
|
The new value for the buffered-io property. |
|
The new value for the size property. |
Since 0.1
void (*Log4gFileAppenderSetQwForFiles) (Log4gAppender *base
,FILE *file
);
The rolling file appender overloads this function.
See
: Log4gRollingFileAppender, Log4gQuietWriter, stdio(3)
|
A file appender object. |
|
The open file handle to write to. |
Since 0.1