# rollingpolicy_type_sizewin.h

Go to the documentation of this file.

    00001
    00002 /*
    00003  * rollingpolicy_type_sizewin.h
    00004  *
    00005  * See the COPYING file for the terms of usage and distribution.
    00006 */
    00007
    00008 #ifndef log4c_policy_type_sizewin_h
    00009 #define log4c_policy_type_sizewin_h
    00010
    00029 #include <log4c/defs.h>
    00030 #include <log4c/rollingpolicy.h>
    00031
    00032 __LOG4C_BEGIN_DECLS
    00033
    00034 LOG4C_API const log4c_rollingpolicy_type_t log4c_rollingpolicy_type_sizewin;
    00035
    00039 typedef struct __sizewin_udata rollingpolicy_sizewin_udata_t;
    00040
    00041 #define ROLLINGPOLICY_SIZE_DEFAULT_MAX_FILE_SIZE 1024*20
    00042 #define ROLLINGPOLICY_SIZE_DEFAULT_MAX_NUM_FILES 5
    00043
    00048 LOG4C_API rollingpolicy_sizewin_udata_t *sizewin_make_udata(void);
    00049
    00059 LOG4C_API int sizewin_udata_set_file_maxsize(
    00060                               rollingpolicy_sizewin_udata_t * swup,
    00061                               long max_size);
    00062
    00069 LOG4C_API int sizewin_udata_set_max_num_files(
    00070                               rollingpolicy_sizewin_udata_t * swup,
    00071                               long max_num);
    00072
    00079 LOG4C_API int sizewin_udata_set_appender(
    00080                               rollingpolicy_sizewin_udata_t * swup,
    00081                               log4c_appender_t* app);
    00082
    00083 __LOG4C_END_DECLS
    00084
    00085
    00086 #endif