rollingpolicy.h(3) | log4c | rollingpolicy.h(3) |
rollingpolicy.h - Log4c rolling policy interface. Defines the interface for managing and providing rolling policies.
#include <stdio.h>
#include <log4c/defs.h>
#include <log4c/layout.h>
struct log4c_rollingpolicy_type
log4c rollingpolicy type. Defines the interface a specific policy must provide
to the rollingfile appender.
#define ROLLINGPOLICY_ROLLOVER_ERR_CAN_LOG 0x05
typedef struct __log4c_rollingpolicy log4c_rollingpolicy_t
typedef struct log4c_rollingpolicy_type
log4c_rollingpolicy_type_t
log4c rollingpolicy type. Defines the interface a specific policy must provide
to the rollingfile appender.
log4c_rollingpolicy_t * log4c_rollingpolicy_get
(const char *policy_name)
const log4c_rollingpolicy_type_t * log4c_rollingpolicy_type_set
(const log4c_rollingpolicy_type_t *a_type)
void log4c_rollingpolicy_set_udata (log4c_rollingpolicy_t
*policyp, void *udatap)
int log4c_rollingpolicy_init (log4c_rollingpolicy_t *policyp,
rollingfile_udata_t *rfup)
int log4c_rollingpolicy_fini (log4c_rollingpolicy_t *policyp)
int log4c_rollingpolicy_is_triggering_event
(log4c_rollingpolicy_t *policyp, const log4c_logging_event_t
*evtp, long current_file_size)
const log4c_rollingpolicy_type_t * log4c_rollingpolicy_set_type
(log4c_rollingpolicy_t *a_rollingpolicy, const
log4c_rollingpolicy_type_t *a_type)
const log4c_rollingpolicy_type_t * log4c_rollingpolicy_type_get
(const char *a_name)
void * log4c_rollingpolicy_get_udata (const
log4c_rollingpolicy_t *policyp)
rollingfile_udata_t * log4c_rollingpolicy_get_rfudata (const
log4c_rollingpolicy_t *policyp)
Log4c rolling policy interface. Defines the interface for managing and providing rolling policies.
A rolling policy is used to confogure a rollingfile appender to tell it when to trigger a rolover event.
Effect a rollover according to policyp on the given file stream.
Parameters
Returns
log4c rollingpolicy type
log4c rollingpolicy type. Defines the interface a specific policy must provide to the rollingfile appender. Attributes description:
Call the un initialization code of a rolling policy. This will call the fini routine of the particular rollingpolicy type to allow it to free up resources. If the call to fini in the rollingpolicy type fails then the rollingpolicy is not uninitialized. Try again later model...
Parameters
Returns
Get a new rolling policy
Parameters
Returns
Get the rollingfile appender associated with this policy.
Parameters
Returns
Get the rolling policy configuration.
Parameters
Returns
Call the initialization code of a rolling policy.
Parameters
Returns
Determine if a logging event should trigger a rollover according to the given policy.
Parameters
Returns
sets the rolling policy type
Parameters
Returns
Configure a rolling policy with a specific policy.
Parameters
Returns
Get a pointer to an existing rollingpolicy type.
Parameters
Returns
Use this function to register a rollingpolicy type with log4c. Once this is done you may refer to this type by name both programmatically and in the log4c configuration file.
Parameters
Returns
Example code fragment:
const log4c_rollingpolicy_type_t log4c_rollingpolicy_type_sizewin = {
"sizewin",
sizewin_init,
sizewin_is_triggering_event,
sizewin_rollover }; log4c_rollingpolicy_type_set(&log4c_rollingpolicy_type_sizewin);
Generated automatically by Doxygen for log4c from the source code.
Thu Jan 19 2023 | Version 1.2.4 |