log4c  1.2.4
rollingpolicy_type_sizewin.h
Go to the documentation of this file.
1 
2 /*
3  * rollingpolicy_type_sizewin.h
4  *
5  * See the COPYING file for the terms of usage and distribution.
6 */
7 
8 #ifndef log4c_policy_type_sizewin_h
9 #define log4c_policy_type_sizewin_h
10 
29 #include <log4c/defs.h>
30 #include <log4c/rollingpolicy.h>
31 
32 __LOG4C_BEGIN_DECLS
33 
34 LOG4C_API const log4c_rollingpolicy_type_t log4c_rollingpolicy_type_sizewin;
35 
39 typedef struct __sizewin_udata rollingpolicy_sizewin_udata_t;
40 
41 #define ROLLINGPOLICY_SIZE_DEFAULT_MAX_FILE_SIZE 1024*20
42 #define ROLLINGPOLICY_SIZE_DEFAULT_MAX_NUM_FILES 5
43 
48 LOG4C_API rollingpolicy_sizewin_udata_t *sizewin_make_udata(void);
49 
59 LOG4C_API int sizewin_udata_set_file_maxsize(
61  long max_size);
62 
69 LOG4C_API int sizewin_udata_set_max_num_files(
71  long max_num);
72 
79 LOG4C_API int sizewin_udata_set_appender(
81  log4c_appender_t* app);
82 
83 __LOG4C_END_DECLS
84 
85 
86 #endif