rollingpol..._sizewin.h(3)

πŸ“¦
version 1.2.4 Β· 5 versions
, in epel 10, fedora 43, fedora 44, ubuntu stonking

πŸ’– 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