stumpless 2.2.0
Loading...
Searching...
No Matches
stumpless_target Struct Reference

A target that log entries can be sent to. More...

#include <target.h>

Data Fields

stumpless_id_t id
 A unique identifier of this target.
 
enum stumpless_target_type type
 The type of this target.
 
char * name
 The name of this target.
 
size_t name_length
 The number of characters in the name.
 
int options
 A bitwise or of all options set on the target.
 
int default_prival
 The prival used for messages without a severity or facility provided.
 
char default_app_name [STUMPLESS_MAX_APP_NAME_LENGTH]
 The app name used for messages without one provided.
 
size_t default_app_name_length
 The number of characters in the default app name.
 
char default_msgid [STUMPLESS_MAX_MSGID_LENGTH]
 The msgid used for messages without one provided.
 
size_t default_msgid_length
 The number of characters in the default msgid.
 
int mask
 The log mask for the target.
 
stumpless_filter_func_t filter
 A filter function used to determine if a given entry should be processed by this target or ignored.
 

Detailed Description

Field Documentation

◆ default_app_name

char stumpless_target::default_app_name[STUMPLESS_MAX_APP_NAME_LENGTH]

The app name used for messages without one provided.

The default app name is not NULL-terminated.

◆ default_app_name_length

size_t stumpless_target::default_app_name_length

The number of characters in the default app name.

◆ default_msgid

char stumpless_target::default_msgid[STUMPLESS_MAX_MSGID_LENGTH]

The msgid used for messages without one provided.

The default msgid is not NULL-terminated.

◆ default_msgid_length

size_t stumpless_target::default_msgid_length

The number of characters in the default msgid.

◆ default_prival

int stumpless_target::default_prival

The prival used for messages without a severity or facility provided.

◆ filter

stumpless_filter_func_t stumpless_target::filter

A filter function used to determine if a given entry should be processed by this target or ignored.

If this is NULL, then all entries sent to the target are accepted. By default targets use the stumpless_mask_filter which filters messages based on the severity bits in the mask of the target.

Since
release v2.1.0

◆ id

stumpless_id_t stumpless_target::id

A unique identifier of this target.

◆ mask

int stumpless_target::mask

The log mask for the target.

Used by the default target filter.

Examples
chain_example.c.

◆ name

char* stumpless_target::name

The name of this target.

For some target types, the name may have more significcance than a simple identifier. For example, the name of a file target will be the file that the target writes to.

The name of the target will be NULL-terminated.

◆ name_length

size_t stumpless_target::name_length

The number of characters in the name.

◆ options

int stumpless_target::options

A bitwise or of all options set on the target.

◆ type

enum stumpless_target_type stumpless_target::type

The type of this target.

The type of a target will not change over the lifetime of the target.


The documentation for this struct was generated from the following file: