#include <log4c/defs.h>
#include <log4c/rollingpolicy.h>
Go to the source code of this file.
Typedefs | |
typedef struct __sizewin_udata | rollingpolicy_sizewin_udata_t |
Functions | |
LOG4C_API rollingpolicy_sizewin_udata_t * | sizewin_make_udata (void) |
LOG4C_API int | sizewin_udata_set_file_maxsize (rollingpolicy_sizewin_udata_t *swup, long max_size) |
LOG4C_API int | sizewin_udata_set_max_num_files (rollingpolicy_sizewin_udata_t *swup, long max_num) |
LOG4C_API int | sizewin_udata_set_appender (rollingpolicy_sizewin_udata_t *swup, log4c_appender_t *app) |
If the max file size is set to zero, this means 'no-limit'.
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.
typedef struct __sizewin_udata rollingpolicy_sizewin_udata_t |
log4c size-win rolling policy type
LOG4C_API rollingpolicy_sizewin_udata_t* sizewin_make_udata | ( | void | ) |
Get a new size-win rolling policy
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.
swup | the size-win configuration object. | |
app | the rolling file appender to set. |
LOG4C_API int sizewin_udata_set_file_maxsize | ( | rollingpolicy_sizewin_udata_t * | swup, | |
long | max_size | |||
) |
Set the maximum file size in this rolling policy configuration.
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. |
LOG4C_API int sizewin_udata_set_max_num_files | ( | rollingpolicy_sizewin_udata_t * | swup, | |
long | max_num | |||
) |
Set the maximum number of filesin this rolling policy configuration.
swup | the size-win configuration object. | |
max_num | the maximum number of files in the list. |