.TH "rollingpolicy_type_sizewin.h" 3 "Version 1.2.4" "log4c" \" -*- nroff -*- .ad l .nh .SH 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\&. .SH SYNOPSIS .br .PP \fC#include \fP .br \fC#include \fP .br .SS "Typedefs" .in +1c .ti -1c .RI "typedef struct __sizewin_udata \fBrollingpolicy_sizewin_udata_t\fP" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBrollingpolicy_sizewin_udata_t\fP * \fBsizewin_make_udata\fP (void)" .br .ti -1c .RI "int \fBsizewin_udata_set_file_maxsize\fP (\fBrollingpolicy_sizewin_udata_t\fP *swup, long max_size)" .br .ti -1c .RI "int \fBsizewin_udata_set_max_num_files\fP (\fBrollingpolicy_sizewin_udata_t\fP *swup, long max_num)" .br .ti -1c .RI "int \fBsizewin_udata_set_appender\fP (\fBrollingpolicy_sizewin_udata_t\fP *swup, \fBlog4c_appender_t\fP *app)" .br .in -1c .SH "Detailed Description" .PP 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\&. If the max file size is set to zero, this means 'no-limit'\&. .PP The default parameters for the size-win policy are 5 files of maximum size of 20kilobytes each\&. These parameters may be changed using the appropriate setter functions\&. .SH "Typedef Documentation" .PP .SS "typedef struct __sizewin_udata \fBrollingpolicy_sizewin_udata_t\fP" log4c size-win rolling policy type .SH "Function Documentation" .PP .SS "\fBrollingpolicy_sizewin_udata_t\fP * sizewin_make_udata (void)" Get a new size-win rolling policy .PP \fBReturns\fP .RS 4 a new size-win rolling policy, otherwise NULL\&. .RE .PP .SS "int sizewin_udata_set_appender (\fBrollingpolicy_sizewin_udata_t\fP * swup, \fBlog4c_appender_t\fP * app)" Set the rolling file appender in this rolling policy configuration\&. .PP \fBParameters\fP .RS 4 \fIswup\fP the size-win configuration object\&. .br \fIapp\fP the rolling file appender to set\&. .RE .PP \fBReturns\fP .RS 4 zero if successful, non-zero otherwise\&. .RE .PP .SS "int sizewin_udata_set_file_maxsize (\fBrollingpolicy_sizewin_udata_t\fP * swup, long max_size)" Set the maximum file size in this rolling policy configuration\&. .PP \fBParameters\fP .RS 4 \fIswup\fP the size-win configuration object\&. .br \fImax_size\fP 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\&. .RE .PP \fBReturns\fP .RS 4 zero if successful, non-zero otherwise\&. .RE .PP .SS "int sizewin_udata_set_max_num_files (\fBrollingpolicy_sizewin_udata_t\fP * swup, long max_num)" Set the maximum number of filesin this rolling policy configuration\&. .PP \fBParameters\fP .RS 4 \fIswup\fP the size-win configuration object\&. .br \fImax_num\fP the maximum number of files in the list\&. .RE .PP \fBReturns\fP .RS 4 zero if successful, non-zero otherwise\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for log4c from the source code\&.