mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
FS-11693 [core] Added switch_channel_set_log_tag() and switch_channel_get_log_tags() This allows you to add log tags to an active call channel. If using SWITCH_CHANNEL_SESSION_LOG, with switch_log_printf(), the tags will be added to the the log node so a logging module can send additional contextual data to a log aggregator.
This commit is contained in:
committed by
Chris Rienzo
parent
2e319c41c0
commit
e4c0abf286
@@ -270,6 +270,9 @@ SWITCH_DECLARE(char *) switch_channel_get_uuid(switch_channel_t *channel);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_set_profile_var(switch_channel_t *channel, const char *name, const char *val);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_set_log_tag(switch_channel_t *channel, const char *tagname, const char *tagvalue);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_get_log_tags(switch_channel_t *channel, switch_event_t **log_tags);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_set_variable_var_check(switch_channel_t *channel,
|
||||
const char *varname, const char *value, switch_bool_t var_check);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_add_variable_var_check(switch_channel_t *channel,
|
||||
|
||||
@@ -65,6 +65,7 @@ SWITCH_BEGIN_EXTERN_C
|
||||
/* To maintain abi, only add new elements to the end of this struct and do not delete any elements */
|
||||
switch_text_channel_t channel;
|
||||
switch_log_level_t slevel;
|
||||
switch_event_t *tags;
|
||||
} switch_log_node_t;
|
||||
|
||||
typedef switch_status_t (*switch_log_function_t) (const switch_log_node_t *node, switch_log_level_t level);
|
||||
|
||||
Reference in New Issue
Block a user