table of contents
rollingpolicy_type_sizewin.h(3) | log4c | rollingpolicy_type_sizewin.h(3) |
NAME¶
rollingpolicy_type_sizewin.h - Log4c rolling file size-win interface. Log4c ships with (and defaults to) the classic size-window rollover policy: this triggers rollover when files reach a maximum size. The first file in the list is always the current file; when a rollover event occurs files are shifted up by one position in the list--if the number of files in the list has already reached the max then the oldest file is rotated out of the window.SYNOPSIS¶
#include <log4c/defs.h>Typedefs¶
typedef struct __sizewin_udata rollingpolicy_sizewin_udata_t
Functions¶
LOG4C_API rollingpolicy_sizewin_udata_t * sizewin_make_udata (void)
Detailed Description¶
Log4c rolling file size-win interface. Log4c ships with (and defaults to) the classic size-window rollover policy: this triggers rollover when files reach a maximum size. The first file in the list is always the current file; when a rollover event occurs files are shifted up by one position in the list--if the number of files in the list has already reached the max then the oldest file is rotated out of the window.Typedef Documentation¶
typedef struct __sizewin_udata rollingpolicy_sizewin_udata_t log4c size-win rolling policy type¶
Function Documentation¶
LOG4C_API rollingpolicy_sizewin_udata_t* sizewin_make_udata (void) Get a new size-win rolling policy¶
Returns:a new size-win rolling policy, otherwise
NULL.
LOG4C_API int sizewin_udata_set_appender (rollingpolicy_sizewin_udata_t *swup, log4c_appender_t *app) Set the rolling file appender in this rolling policy configuration.¶
Parameters:swup the size-win configuration object.
app the rolling file appender to set.
Returns:
zero if successful, non-zero otherwise.
LOG4C_API int sizewin_udata_set_file_maxsize (rollingpolicy_sizewin_udata_t *swup, longmax_size) Set the maximum file size in this rolling policy configuration.¶
Parameters:swup the size-win configuration object.
max_size the approximate maximum size any logging file will attain. If
you set zero then it means 'no-limit' and so only one file of unlimited size
will be used for logging.
Returns:
zero if successful, non-zero otherwise.
LOG4C_API int sizewin_udata_set_max_num_files (rollingpolicy_sizewin_udata_t *swup, longmax_num) Set the maximum number of filesin this rolling policy configuration.¶
Parameters:swup the size-win configuration object.
max_num the maximum number of files in the list.
Returns:
zero if successful, non-zero otherwise.
Author¶
Generated automatically by Doxygen for log4c from the source code.Mon May 2 2011 | Version 1.2.1 |