rollingpol..._sizewin.h(3)
π rollingpolicy_type_sizewin.h π
okay bestie, welcome to the Library Functions Manual page for rollingpolicy_type_sizewin.h β yes that's the whole filename, and yes the page title up top is rollingpol..._sizewin.h(3) because someone at the typesetting factory ran out of room. we move. π
β¨ NAME β¨
rollingpolicy_type_sizewin.h β Log4c rolling file size-win interface, babes.
So like, Log4c ships with (and defaults to) the classic size-window rollover policy, and what that means is: this thing triggers rollover when your files hit a maximum size. periodt. The first file in the list is always the current file. When a rollover event happens, files get shifted up by one position in the list β and if the number of files in the list has already reached the max, then the oldest file gets rotated out of the window. bye girl π
πΈ SYNOPSIS πΈ
#include <log4c/defs.h>
#include <log4c/rollingpolicy.h>
π¦ Typedefs
typedef struct __sizewin_udata rollingpolicy_sizewin_udata_t
π¦ Functions
rollingpolicy_sizewin_udata_t * sizewin_make_udata (void)
int sizewin_udata_set_file_maxsize (rollingpolicy_sizewin_udata_t *swup,
long max_size)
int sizewin_udata_set_max_num_files (rollingpolicy_sizewin_udata_t
*swup, long max_num)
int sizewin_udata_set_appender (rollingpolicy_sizewin_udata_t *swup,
log4c_appender_t *app)
π Detailed Description π
Log4c rolling file size-win interface. Say it with me: Log4c ships with (and defaults to) the classic size-window rollover policy β it triggers rollover when files reach a maximum size. The first file in the list is always the current file π«Ά and when a rollover event occurs, files are shifted up by one position in the list. And if the number of files in the list has already reached the max? The oldest file is rotated out of the window. no cap.
If the max file size is set to zero, that means 'no-limit'. iconic behaviour honestly.
The default parameters for the size-win policy are 5 files of maximum size of 20kilobytes each. and you can change all of that with the appropriate setter functions, bestie, they're right there.
π§ Typedef Documentation π§
π typedef struct __sizewin_udata rollingpolicy_sizewin_udata_t
log4c size-win rolling policy type. that's it, that's the girl π
β Function Documentation β
πΈ rollingpolicy_sizewin_udata_t * sizewin_make_udata (void )
Get a new size-win rolling policy. main character energy, fresh out the box β¨
Returns
a new size-win rolling policy, otherwise NULL. π
πΈ 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.
πΈ int sizewin_udata_set_file_maxsize (rollingpolicy_sizewin_udata_t * swup, long max_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.
πΈ int sizewin_udata_set_max_num_files (rollingpolicy_sizewin_udata_t * swup, long max_num)
Set the maximum number of files in this rolling policy configuration. (the original page says "filesin" and honestly? relatable typo, we've all been there π but you get it.)
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. (not me writing these by hand, the robots did it π€π)
okay that's the whole page, you ate it, go configure your rolling policy bestie π β¨
log4c Β· Version 1.2.4 Β· page <cyan>rollingpol..._sizewin.h(3)</cyan> β mwah, ily, bye ππ¦
π¦ where this page comes from
- epel 10: log4c-devel 1.2.4-32.el10_0 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: log4c-devel 1.2.4-34.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: log4c-devel 1.2.4-34.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: log4c-devel 1.2.4-35.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: log4c-devel 1.2.4-35.fc44 Β· LicenseRef-Callaway-LGPLv2+
- ubuntu stonking: liblog4c-doc 1.2.4-6
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms