syslog-ng source
logmsg.c File Reference
#include "logmsg/logmsg.h"
#include "str-utils.h"
#include "str-repr/encode.h"
#include "messages.h"
#include "logpipe.h"
#include "timeutils/cache.h"
#include "timeutils/misc.h"
#include "logmsg/nvtable.h"
#include "stats/stats-registry.h"
#include "stats/stats-cluster-single.h"
#include "template/templates.h"
#include "tls-support.h"
#include "compat/string.h"
#include "rcptid.h"
#include "template/macros.h"
#include "host-id.h"
#include "ack-tracker/ack_tracker.h"
#include "apphook.h"
#include "scratch-buffers.h"
#include "str-format.h"
#include <glib/gprintf.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include <stdlib.h>
#include <ctype.h>
#include <syslog.h>
Include dependency graph for logmsg.c:

Macros

#define logmsg_current   __slng_tls_deref(logmsg_current)
 
#define logmsg_cached_refs   __slng_tls_deref(logmsg_cached_refs)
 
#define logmsg_cached_acks   __slng_tls_deref(logmsg_cached_acks)
 
#define logmsg_cached_ack_needed   __slng_tls_deref(logmsg_cached_ack_needed)
 
#define logmsg_cached_abort   __slng_tls_deref(logmsg_cached_abort)
 
#define logmsg_cached_suspend   __slng_tls_deref(logmsg_cached_suspend)
 
#define LOGMSG_REFCACHE_SUSPEND_SHIFT   31 /* number of bits to shift to get the SUSPEND flag */
 
#define LOGMSG_REFCACHE_SUSPEND_MASK   0x80000000 /* bit mask to extract the SUSPEND flag */
 
#define LOGMSG_REFCACHE_ABORT_SHIFT   30 /* number of bits to shift to get the ABORT flag */
 
#define LOGMSG_REFCACHE_ABORT_MASK   0x40000000 /* bit mask to extract the ABORT flag */
 
#define LOGMSG_REFCACHE_ACK_SHIFT   15 /* number of bits to shift to get the ACK counter */
 
#define LOGMSG_REFCACHE_ACK_MASK   0x3FFF8000 /* bit mask to extract the ACK counter */
 
#define LOGMSG_REFCACHE_REF_SHIFT   0 /* number of bits to shift to get the REF counter */
 
#define LOGMSG_REFCACHE_REF_MASK   0x00007FFF /* bit mask to extract the ACK counter */
 
#define LOGMSG_REFCACHE_BIAS   0x00002000 /* the BIAS we add to the ref counter in refcache_start */
 
#define LOGMSG_REFCACHE_REF_TO_VALUE(x)   (((x) << LOGMSG_REFCACHE_REF_SHIFT) & LOGMSG_REFCACHE_REF_MASK)
 
#define LOGMSG_REFCACHE_ACK_TO_VALUE(x)   (((x) << LOGMSG_REFCACHE_ACK_SHIFT) & LOGMSG_REFCACHE_ACK_MASK)
 
#define LOGMSG_REFCACHE_ABORT_TO_VALUE(x)   (((x) << LOGMSG_REFCACHE_ABORT_SHIFT) & LOGMSG_REFCACHE_ABORT_MASK)
 
#define LOGMSG_REFCACHE_SUSPEND_TO_VALUE(x)   (((x) << LOGMSG_REFCACHE_SUSPEND_SHIFT) & LOGMSG_REFCACHE_SUSPEND_MASK)
 
#define LOGMSG_REFCACHE_VALUE_TO_REF(x)   (((x) & LOGMSG_REFCACHE_REF_MASK) >> LOGMSG_REFCACHE_REF_SHIFT)
 
#define LOGMSG_REFCACHE_VALUE_TO_ACK(x)   (((x) & LOGMSG_REFCACHE_ACK_MASK) >> LOGMSG_REFCACHE_ACK_SHIFT)
 
#define LOGMSG_REFCACHE_VALUE_TO_ABORT(x)   (((x) & LOGMSG_REFCACHE_ABORT_MASK) >> LOGMSG_REFCACHE_ABORT_SHIFT)
 
#define LOGMSG_REFCACHE_VALUE_TO_SUSPEND(x)   (((x) & LOGMSG_REFCACHE_SUSPEND_MASK) >> LOGMSG_REFCACHE_SUSPEND_SHIFT)
 

Functions

const gchar * log_msg_value_type_to_str (LogMessageValueType self)
 
gboolean log_msg_value_type_from_str (const gchar *in_str, LogMessageValueType *out_type)
 
void log_msg_write_protect (LogMessage *self)
 
LogMessage * log_msg_make_writable (LogMessage **pself, const LogPathOptions *path_options)
 
NVHandle log_msg_get_value_handle (const gchar *value_name)
 
gboolean log_msg_is_value_name_valid (const gchar *value)
 
const gchar * log_msg_get_macro_value (const LogMessage *self, gint id, gssize *value_len, LogMessageValueType *type)
 
LogMessageQueueNodelog_msg_alloc_queue_node (LogMessage *msg, const LogPathOptions *path_options)
 
LogMessageQueueNodelog_msg_alloc_dynamic_queue_node (LogMessage *msg, const LogPathOptions *path_options)
 
void log_msg_free_queue_node (LogMessageQueueNode *node)
 
void log_msg_rename_value (LogMessage *self, NVHandle from, NVHandle to)
 
void log_msg_set_value_with_type (LogMessage *self, NVHandle handle, const gchar *value, gssize value_len, LogMessageValueType type)
 
void log_msg_set_value (LogMessage *self, NVHandle handle, const gchar *value, gssize value_len)
 
void log_msg_unset_value (LogMessage *self, NVHandle handle)
 
void log_msg_unset_value_by_name (LogMessage *self, const gchar *name)
 
void log_msg_set_value_indirect_with_type (LogMessage *self, NVHandle handle, NVHandle ref_handle, guint16 ofs, guint16 len, LogMessageValueType type)
 
void log_msg_set_value_indirect (LogMessage *self, NVHandle handle, NVHandle ref_handle, guint16 ofs, guint16 len)
 
gboolean log_msg_values_foreach (const LogMessage *self, NVTableForeachFunc func, gpointer user_data)
 
NVHandle log_msg_get_match_handle (gint index_)
 
gint log_msg_get_match_index (NVHandle handle)
 
void log_msg_set_match_with_type (LogMessage *self, gint index_, const gchar *value, gssize value_len, LogMessageValueType type)
 
void log_msg_set_match (LogMessage *self, gint index_, const gchar *value, gssize value_len)
 
void log_msg_set_match_indirect_with_type (LogMessage *self, gint index_, NVHandle ref_handle, guint16 ofs, guint16 len, LogMessageValueType type)
 
void log_msg_set_match_indirect (LogMessage *self, gint index_, NVHandle ref_handle, guint16 ofs, guint16 len)
 
const gchar * log_msg_get_match_if_set_with_type (const LogMessage *self, gint index_, gssize *value_len, LogMessageValueType *type)
 
const gchar * log_msg_get_match_with_type (const LogMessage *self, gint index_, gssize *value_len, LogMessageValueType *type)
 
const gchar * log_msg_get_match (const LogMessage *self, gint index_, gssize *value_len)
 
void log_msg_unset_match (LogMessage *self, gint index_)
 
void log_msg_truncate_matches (LogMessage *self, gint n)
 
void log_msg_clear_matches (LogMessage *self)
 
void log_msg_tags_foreach (const LogMessage *self, LogMessageTagsForeachFunc callback, gpointer user_data)
 
void log_msg_set_tag_by_id_onoff (LogMessage *self, LogTagId id, gboolean on)
 
void log_msg_set_tag_by_id (LogMessage *self, LogTagId id)
 
void log_msg_set_tag_by_name (LogMessage *self, const gchar *name)
 
void log_msg_clear_tag_by_id (LogMessage *self, LogTagId id)
 
void log_msg_clear_tag_by_name (LogMessage *self, const gchar *name)
 
gboolean log_msg_is_tag_by_id (LogMessage *self, LogTagId id)
 
gboolean log_msg_is_tag_by_name (LogMessage *self, const gchar *name)
 
void log_msg_append_format_sdata (const LogMessage *self, GString *result, guint32 seq_num)
 
void log_msg_format_sdata (const LogMessage *self, GString *result, guint32 seq_num)
 
void log_msg_clear_sdata (LogMessage *self)
 
gboolean log_msg_append_tags_callback (const LogMessage *self, LogTagId tag_id, const gchar *name, gpointer user_data)
 
void log_msg_format_tags (const LogMessage *self, GString *result, gboolean include_localtags)
 
void log_msg_format_matches (const LogMessage *self, GString *result)
 
void log_msg_set_saddr (LogMessage *self, GSockAddr *saddr)
 
void log_msg_set_saddr_ref (LogMessage *self, GSockAddr *saddr)
 
void log_msg_set_daddr (LogMessage *self, GSockAddr *daddr)
 
void log_msg_set_daddr_ref (LogMessage *self, GSockAddr *daddr)
 
void log_msg_clear (LogMessage *self)
 
void log_msg_merge_context (LogMessage *self, LogMessage **context, gsize context_len)
 
LogMessage * log_msg_clone_cow (LogMessage *msg, const LogPathOptions *path_options)
 
LogMessage * log_msg_sized_new (gsize payload_size)
 
LogMessage * log_msg_new_empty (void)
 
LogMessage * log_msg_new_local (void)
 
LogMessage * log_msg_new_internal (gint prio, const gchar *msg)
 
LogMessage * log_msg_new_mark (void)
 
void log_msg_drop (LogMessage *msg, const LogPathOptions *path_options, AckType ack_type)
 
LogMessage * log_msg_ref (LogMessage *self)
 
void log_msg_unref (LogMessage *self)
 
void log_msg_add_ack (LogMessage *self, const LogPathOptions *path_options)
 
void log_msg_ack (LogMessage *self, const LogPathOptions *path_options, AckType ack_type)
 
const LogPathOptions * log_msg_break_ack (LogMessage *msg, const LogPathOptions *path_options, LogPathOptions *local_path_options)
 
void log_msg_refcache_start_producer (LogMessage *self)
 
void log_msg_refcache_start_consumer (LogMessage *self, const LogPathOptions *path_options)
 
void log_msg_refcache_stop (void)
 
void log_msg_tags_init (void)
 
void log_msg_registry_init (void)
 
void log_msg_registry_deinit (void)
 
void log_msg_registry_foreach (GHFunc func, gpointer user_data)
 
void log_msg_global_init (void)
 
const gchar * log_msg_get_handle_name (NVHandle handle, gssize *length)
 
void log_msg_global_deinit (void)
 
gint log_msg_lookup_time_stamp_name (const gchar *name)
 
gssize log_msg_get_size (LogMessage *self)
 

Variables

 TLS_BLOCK_START
 
gboolean logmsg_cached_ack_needed
 
gint logmsg_cached_refs
 
gint logmsg_cached_acks
 
gboolean logmsg_cached_abort
 
gboolean logmsg_cached_suspend
 
 TLS_BLOCK_END
 
const gchar * builtin_value_names []
 
NVRegistry * logmsg_registry
 
const char logmsg_sd_prefix [] = ".SDATA."
 
const gint logmsg_sd_prefix_len = sizeof(logmsg_sd_prefix) - 1
 
gint logmsg_queue_node_max = 1
 

Macro Definition Documentation

◆ logmsg_cached_abort

#define logmsg_cached_abort   __slng_tls_deref(logmsg_cached_abort)

◆ logmsg_cached_ack_needed

#define logmsg_cached_ack_needed   __slng_tls_deref(logmsg_cached_ack_needed)

◆ logmsg_cached_acks

#define logmsg_cached_acks   __slng_tls_deref(logmsg_cached_acks)

◆ logmsg_cached_refs

#define logmsg_cached_refs   __slng_tls_deref(logmsg_cached_refs)

◆ logmsg_cached_suspend

#define logmsg_cached_suspend   __slng_tls_deref(logmsg_cached_suspend)

◆ logmsg_current

#define logmsg_current   __slng_tls_deref(logmsg_current)

◆ LOGMSG_REFCACHE_ABORT_MASK

#define LOGMSG_REFCACHE_ABORT_MASK   0x40000000 /* bit mask to extract the ABORT flag */

◆ LOGMSG_REFCACHE_ABORT_SHIFT

#define LOGMSG_REFCACHE_ABORT_SHIFT   30 /* number of bits to shift to get the ABORT flag */

◆ LOGMSG_REFCACHE_ABORT_TO_VALUE

#define LOGMSG_REFCACHE_ABORT_TO_VALUE (   x)    (((x) << LOGMSG_REFCACHE_ABORT_SHIFT) & LOGMSG_REFCACHE_ABORT_MASK)

◆ LOGMSG_REFCACHE_ACK_MASK

#define LOGMSG_REFCACHE_ACK_MASK   0x3FFF8000 /* bit mask to extract the ACK counter */

◆ LOGMSG_REFCACHE_ACK_SHIFT

#define LOGMSG_REFCACHE_ACK_SHIFT   15 /* number of bits to shift to get the ACK counter */

◆ LOGMSG_REFCACHE_ACK_TO_VALUE

#define LOGMSG_REFCACHE_ACK_TO_VALUE (   x)    (((x) << LOGMSG_REFCACHE_ACK_SHIFT) & LOGMSG_REFCACHE_ACK_MASK)

◆ LOGMSG_REFCACHE_BIAS

#define LOGMSG_REFCACHE_BIAS   0x00002000 /* the BIAS we add to the ref counter in refcache_start */

◆ LOGMSG_REFCACHE_REF_MASK

#define LOGMSG_REFCACHE_REF_MASK   0x00007FFF /* bit mask to extract the ACK counter */

◆ LOGMSG_REFCACHE_REF_SHIFT

#define LOGMSG_REFCACHE_REF_SHIFT   0 /* number of bits to shift to get the REF counter */

◆ LOGMSG_REFCACHE_REF_TO_VALUE

#define LOGMSG_REFCACHE_REF_TO_VALUE (   x)    (((x) << LOGMSG_REFCACHE_REF_SHIFT) & LOGMSG_REFCACHE_REF_MASK)

◆ LOGMSG_REFCACHE_SUSPEND_MASK

#define LOGMSG_REFCACHE_SUSPEND_MASK   0x80000000 /* bit mask to extract the SUSPEND flag */

◆ LOGMSG_REFCACHE_SUSPEND_SHIFT

#define LOGMSG_REFCACHE_SUSPEND_SHIFT   31 /* number of bits to shift to get the SUSPEND flag */

◆ LOGMSG_REFCACHE_SUSPEND_TO_VALUE

#define LOGMSG_REFCACHE_SUSPEND_TO_VALUE (   x)    (((x) << LOGMSG_REFCACHE_SUSPEND_SHIFT) & LOGMSG_REFCACHE_SUSPEND_MASK)

◆ LOGMSG_REFCACHE_VALUE_TO_ABORT

#define LOGMSG_REFCACHE_VALUE_TO_ABORT (   x)    (((x) & LOGMSG_REFCACHE_ABORT_MASK) >> LOGMSG_REFCACHE_ABORT_SHIFT)

◆ LOGMSG_REFCACHE_VALUE_TO_ACK

#define LOGMSG_REFCACHE_VALUE_TO_ACK (   x)    (((x) & LOGMSG_REFCACHE_ACK_MASK) >> LOGMSG_REFCACHE_ACK_SHIFT)

◆ LOGMSG_REFCACHE_VALUE_TO_REF

#define LOGMSG_REFCACHE_VALUE_TO_REF (   x)    (((x) & LOGMSG_REFCACHE_REF_MASK) >> LOGMSG_REFCACHE_REF_SHIFT)

◆ LOGMSG_REFCACHE_VALUE_TO_SUSPEND

#define LOGMSG_REFCACHE_VALUE_TO_SUSPEND (   x)    (((x) & LOGMSG_REFCACHE_SUSPEND_MASK) >> LOGMSG_REFCACHE_SUSPEND_SHIFT)

Function Documentation

◆ log_msg_ack()

void log_msg_ack ( LogMessage *  self,
const LogPathOptions *  path_options,
AckType  ack_type 
)

log_msg_ack: @msg: LogMessage instance @path_options: path specific options @acked: TRUE: positive ack, FALSE: negative ACK

Indicate that the message was processed successfully and the sender can queue further messages.

◆ log_msg_add_ack()

void log_msg_add_ack ( LogMessage *  self,
const LogPathOptions *  path_options 
)

log_msg_add_ack: @m: LogMessage instance

This function increments the number of required acknowledges.

◆ log_msg_alloc_dynamic_queue_node()

LogMessageQueueNode* log_msg_alloc_dynamic_queue_node ( LogMessage *  msg,
const LogPathOptions *  path_options 
)

◆ log_msg_alloc_queue_node()

LogMessageQueueNode* log_msg_alloc_queue_node ( LogMessage *  msg,
const LogPathOptions *  path_options 
)

◆ log_msg_append_format_sdata()

void log_msg_append_format_sdata ( const LogMessage *  self,
GString *  result,
guint32  seq_num 
)

◆ log_msg_append_tags_callback()

gboolean log_msg_append_tags_callback ( const LogMessage *  self,
LogTagId  tag_id,
const gchar *  name,
gpointer  user_data 
)

◆ log_msg_break_ack()

const LogPathOptions* log_msg_break_ack ( LogMessage *  msg,
const LogPathOptions *  path_options,
LogPathOptions *  local_path_options 
)

◆ log_msg_clear()

void log_msg_clear ( LogMessage *  self)

◆ log_msg_clear_matches()

void log_msg_clear_matches ( LogMessage *  self)

◆ log_msg_clear_sdata()

void log_msg_clear_sdata ( LogMessage *  self)

◆ log_msg_clear_tag_by_id()

void log_msg_clear_tag_by_id ( LogMessage *  self,
LogTagId  id 
)

◆ log_msg_clear_tag_by_name()

void log_msg_clear_tag_by_name ( LogMessage *  self,
const gchar *  name 
)

◆ log_msg_clone_cow()

LogMessage* log_msg_clone_cow ( LogMessage *  msg,
const LogPathOptions *  path_options 
)

◆ log_msg_drop()

void log_msg_drop ( LogMessage *  msg,
const LogPathOptions *  path_options,
AckType  ack_type 
)

log_msg_drop: @msg: LogMessage instance @path_options: path specific options

This function is called whenever a destination driver feels that it is unable to process this message. It acks and unrefs the message.

◆ log_msg_format_matches()

void log_msg_format_matches ( const LogMessage *  self,
GString *  result 
)

◆ log_msg_format_sdata()

void log_msg_format_sdata ( const LogMessage *  self,
GString *  result,
guint32  seq_num 
)

◆ log_msg_format_tags()

void log_msg_format_tags ( const LogMessage *  self,
GString *  result,
gboolean  include_localtags 
)

◆ log_msg_free_queue_node()

void log_msg_free_queue_node ( LogMessageQueueNode node)

◆ log_msg_get_handle_name()

const gchar* log_msg_get_handle_name ( NVHandle  handle,
gssize *  length 
)

◆ log_msg_get_macro_value()

const gchar* log_msg_get_macro_value ( const LogMessage *  self,
gint  id,
gssize *  value_len,
LogMessageValueType type 
)

◆ log_msg_get_match()

const gchar* log_msg_get_match ( const LogMessage *  self,
gint  index_,
gssize *  value_len 
)

◆ log_msg_get_match_handle()

NVHandle log_msg_get_match_handle ( gint  index_)

◆ log_msg_get_match_if_set_with_type()

const gchar* log_msg_get_match_if_set_with_type ( const LogMessage *  self,
gint  index_,
gssize *  value_len,
LogMessageValueType type 
)

◆ log_msg_get_match_index()

gint log_msg_get_match_index ( NVHandle  handle)

◆ log_msg_get_match_with_type()

const gchar * log_msg_get_match_with_type ( const LogMessage *  self,
gint  index_,
gssize *  value_len,
LogMessageValueType type 
)

◆ log_msg_get_size()

gssize log_msg_get_size ( LogMessage *  self)

◆ log_msg_get_value_handle()

NVHandle log_msg_get_value_handle ( const gchar *  value_name)

◆ log_msg_global_deinit()

void log_msg_global_deinit ( void  )

◆ log_msg_global_init()

void log_msg_global_init ( void  )

◆ log_msg_is_tag_by_id()

gboolean log_msg_is_tag_by_id ( LogMessage *  self,
LogTagId  id 
)

◆ log_msg_is_tag_by_name()

gboolean log_msg_is_tag_by_name ( LogMessage *  self,
const gchar *  name 
)

◆ log_msg_is_value_name_valid()

gboolean log_msg_is_value_name_valid ( const gchar *  value)

◆ log_msg_lookup_time_stamp_name()

gint log_msg_lookup_time_stamp_name ( const gchar *  name)

◆ log_msg_make_writable()

LogMessage* log_msg_make_writable ( LogMessage **  pself,
const LogPathOptions *  path_options 
)

◆ log_msg_merge_context()

void log_msg_merge_context ( LogMessage *  self,
LogMessage **  context,
gsize  context_len 
)

◆ log_msg_new_empty()

LogMessage* log_msg_new_empty ( void  )

◆ log_msg_new_internal()

LogMessage* log_msg_new_internal ( gint  prio,
const gchar *  msg 
)

log_msg_new_internal: @prio: message priority (LOG_*) @msg: message text @flags: parse flags (LP_*)

This function creates a new log message for messages originating internally to syslog-ng

◆ log_msg_new_local()

LogMessage* log_msg_new_local ( void  )

◆ log_msg_new_mark()

LogMessage* log_msg_new_mark ( void  )

log_msg_new_mark:

This function returns a new MARK message. MARK messages have the LF_MARK flag set.

◆ log_msg_ref()

LogMessage* log_msg_ref ( LogMessage *  self)

log_msg_ref: @self: LogMessage instance

Increment reference count of @self and return the new reference.

◆ log_msg_refcache_start_consumer()

void log_msg_refcache_start_consumer ( LogMessage *  self,
const LogPathOptions *  path_options 
)

◆ log_msg_refcache_start_producer()

void log_msg_refcache_start_producer ( LogMessage *  self)

◆ log_msg_refcache_stop()

void log_msg_refcache_stop ( void  )

◆ log_msg_registry_deinit()

void log_msg_registry_deinit ( void  )

◆ log_msg_registry_foreach()

void log_msg_registry_foreach ( GHFunc  func,
gpointer  user_data 
)

◆ log_msg_registry_init()

void log_msg_registry_init ( void  )

◆ log_msg_rename_value()

void log_msg_rename_value ( LogMessage *  self,
NVHandle  from,
NVHandle  to 
)

◆ log_msg_set_daddr()

void log_msg_set_daddr ( LogMessage *  self,
GSockAddr daddr 
)

◆ log_msg_set_daddr_ref()

void log_msg_set_daddr_ref ( LogMessage *  self,
GSockAddr daddr 
)

◆ log_msg_set_match()

void log_msg_set_match ( LogMessage *  self,
gint  index_,
const gchar *  value,
gssize  value_len 
)

◆ log_msg_set_match_indirect()

void log_msg_set_match_indirect ( LogMessage *  self,
gint  index_,
NVHandle  ref_handle,
guint16  ofs,
guint16  len 
)

◆ log_msg_set_match_indirect_with_type()

void log_msg_set_match_indirect_with_type ( LogMessage *  self,
gint  index_,
NVHandle  ref_handle,
guint16  ofs,
guint16  len,
LogMessageValueType  type 
)

◆ log_msg_set_match_with_type()

void log_msg_set_match_with_type ( LogMessage *  self,
gint  index_,
const gchar *  value,
gssize  value_len,
LogMessageValueType  type 
)

◆ log_msg_set_saddr()

void log_msg_set_saddr ( LogMessage *  self,
GSockAddr saddr 
)

◆ log_msg_set_saddr_ref()

void log_msg_set_saddr_ref ( LogMessage *  self,
GSockAddr saddr 
)

◆ log_msg_set_tag_by_id()

void log_msg_set_tag_by_id ( LogMessage *  self,
LogTagId  id 
)

◆ log_msg_set_tag_by_id_onoff()

void log_msg_set_tag_by_id_onoff ( LogMessage *  self,
LogTagId  id,
gboolean  on 
)

◆ log_msg_set_tag_by_name()

void log_msg_set_tag_by_name ( LogMessage *  self,
const gchar *  name 
)

◆ log_msg_set_value()

void log_msg_set_value ( LogMessage *  self,
NVHandle  handle,
const gchar *  value,
gssize  value_len 
)

◆ log_msg_set_value_indirect()

void log_msg_set_value_indirect ( LogMessage *  self,
NVHandle  handle,
NVHandle  ref_handle,
guint16  ofs,
guint16  len 
)

◆ log_msg_set_value_indirect_with_type()

void log_msg_set_value_indirect_with_type ( LogMessage *  self,
NVHandle  handle,
NVHandle  ref_handle,
guint16  ofs,
guint16  len,
LogMessageValueType  type 
)

◆ log_msg_set_value_with_type()

void log_msg_set_value_with_type ( LogMessage *  self,
NVHandle  handle,
const gchar *  value,
gssize  value_len,
LogMessageValueType  type 
)

◆ log_msg_sized_new()

LogMessage* log_msg_sized_new ( gsize  payload_size)

◆ log_msg_tags_foreach()

void log_msg_tags_foreach ( const LogMessage *  self,
LogMessageTagsForeachFunc  callback,
gpointer  user_data 
)

◆ log_msg_tags_init()

void log_msg_tags_init ( void  )

◆ log_msg_truncate_matches()

void log_msg_truncate_matches ( LogMessage *  self,
gint  n 
)

◆ log_msg_unref()

void log_msg_unref ( LogMessage *  self)

log_msg_unref: @self: LogMessage instance

Decrement reference count and free self if the reference count becomes 0.

◆ log_msg_unset_match()

void log_msg_unset_match ( LogMessage *  self,
gint  index_ 
)

◆ log_msg_unset_value()

void log_msg_unset_value ( LogMessage *  self,
NVHandle  handle 
)

◆ log_msg_unset_value_by_name()

void log_msg_unset_value_by_name ( LogMessage *  self,
const gchar *  name 
)

◆ log_msg_value_type_from_str()

gboolean log_msg_value_type_from_str ( const gchar *  in_str,
LogMessageValueType out_type 
)

◆ log_msg_value_type_to_str()

const gchar* log_msg_value_type_to_str ( LogMessageValueType  self)

◆ log_msg_values_foreach()

gboolean log_msg_values_foreach ( const LogMessage *  self,
NVTableForeachFunc  func,
gpointer  user_data 
)

◆ log_msg_write_protect()

void log_msg_write_protect ( LogMessage *  self)

Variable Documentation

◆ builtin_value_names

const gchar* builtin_value_names[]
Initial value:
=
{
"HOST",
"HOST_FROM",
"MESSAGE",
"PROGRAM",
"PID",
"MSGID",
"SOURCE",
"LEGACY_MSGHDR",
"__RESERVED_LM_V_MAX",
NULL,
}

◆ logmsg_cached_abort

gboolean logmsg_cached_abort

◆ logmsg_cached_ack_needed

gboolean logmsg_cached_ack_needed

◆ logmsg_cached_acks

gint logmsg_cached_acks

◆ logmsg_cached_refs

gint logmsg_cached_refs

◆ logmsg_cached_suspend

gboolean logmsg_cached_suspend

◆ logmsg_queue_node_max

gint logmsg_queue_node_max = 1

◆ logmsg_registry

NVRegistry* logmsg_registry

◆ logmsg_sd_prefix

const char logmsg_sd_prefix[] = ".SDATA."

◆ logmsg_sd_prefix_len

const gint logmsg_sd_prefix_len = sizeof(logmsg_sd_prefix) - 1

◆ TLS_BLOCK_END

TLS_BLOCK_END

◆ TLS_BLOCK_START

TLS_BLOCK_START
Initial value:
{
LogMessage *logmsg_current
#define logmsg_current
Definition: logmsg.c:144