Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

log4c_rollingpolicy_sizewin_udata_t(3) [debian man page]

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> #include <log4c/rollingpolicy.h> 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) 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. 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 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. Version 1.2.1 Mon May 2 2011 rollingpolicy_type_sizewin.h(3)

Check Out this Related Man Page

appender_type_rollingfile.h(3)					       log4c					    appender_type_rollingfile.h(3)

NAME
appender_type_rollingfile.h - Log4c rolling file appender interface. SYNOPSIS
#include <log4c/defs.h> #include <log4c/appender.h> #include <log4c/rollingpolicy.h> Functions LOG4C_API rollingfile_udata_t * rollingfile_make_udata (void) LOG4C_API int rollingfile_udata_set_logdir (rollingfile_udata_t *rfudatap, char *logdir) LOG4C_API int rollingfile_udata_set_files_prefix (rollingfile_udata_t *rfudatap, char *prefix) LOG4C_API int rollingfile_udata_set_policy (rollingfile_udata_t *rfudatap, log4c_rollingpolicy_t *policyp) LOG4C_API const char * rollingfile_udata_get_logdir (rollingfile_udata_t *rfudatap) LOG4C_API const char * rollingfile_udata_get_files_prefix (rollingfile_udata_t *rfudatap) LOG4C_API long rollingfile_get_current_file_size (rollingfile_udata_t *rfudatap) Variables __LOG4C_BEGIN_DECLS LOG4C_API const log4c_appender_type_t log4c_appender_type_rollingfile Detailed Description Log4c rolling file appender interface. The rolling file appender implements a logging mechanism of a list of files up to a maximum number. The files are written by default to the current directory with logging names folowing the pattern log.1, log.2 etc. These parameters may be changed using the appropriate setter functions. If the appender fails to open logfiles for writing then the messages are logged to stderr--it will continue to try to open the zero-th file for writing at rollover events so if it succeeds at some point to open that file the messages will start to appear therein and will no longer be sent to stderr. Switching from logging from one file to the next is referred to as a 'rollover event'. The policy that determines when a rollover event should happen is called a 'rolling policy'. A mechanism is provided to allow different rolling policies to be defined. 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. See the documentation in the rollingpolicy_type_sizewin.h file for more details on the size-win rollover policy. Function Documentation LOG4C_API long rollingfile_get_current_file_size (rollingfile_udata_t *rfudatap) Get the prefix string in this rolling file appender configuration. Parameters: rfudatap the rolling file appender configuration object. Returns: the current size of the file being logged to. LOG4C_API rollingfile_udata_t* rollingfile_make_udata (void) Get a new rolling file appender configuration object. Returns: a new rolling file appender configuration object, otherwise NULL. LOG4C_API const char* rollingfile_udata_get_files_prefix (rollingfile_udata_t *rfudatap) Get the prefix string in this rolling file appender configuration. Parameters: rfudatap the rolling file appender configuration object. Returns: the prefix. LOG4C_API const char* rollingfile_udata_get_logdir (rollingfile_udata_t *rfudatap) Get the logging directory in this rolling file appender configuration. Parameters: rfudatap the rolling file appender configuration object. Returns: the logging directory. LOG4C_API int rollingfile_udata_set_files_prefix (rollingfile_udata_t *rfudatap, char *prefix) Set the prefix string in this rolling file appender configuration. Parameters: rfudatap the rolling file appender configuration object. prefix the logging files prfix to use. Returns: zero if successful, non-zero otherwise. LOG4C_API int rollingfile_udata_set_logdir (rollingfile_udata_t *rfudatap, char *logdir) Set the logging directory in this rolling file appender configuration. Parameters: rfudatap the rolling file appender configuration object. logdir the logging directory to set. Returns: zero if successful, non-zero otherwise. LOG4C_API int rollingfile_udata_set_policy (rollingfile_udata_t *rfudatap, log4c_rollingpolicy_t *policyp) Set the rolling policy in this rolling file appender configuration. Parameters: rfudatap the rolling file appender configuration object. policyp the logging files prfix to use. Returns: zero if successful, non-zero otherwise. Variable Documentation __LOG4C_BEGIN_DECLS LOG4C_API const log4c_appender_type_t log4c_appender_type_rollingfile rollingfile appender type definition. This should be used as a parameter to the log4c_appender_set_type() routine to set the type of the appender. Author Generated automatically by Doxygen for log4c from the source code. Version 1.2.1 Mon May 2 2011 appender_type_rollingfile.h(3)
Man Page