syslog-ng source
messages.c File Reference
#include "messages.h"
#include "timeutils/cache.h"
#include "logmsg/logmsg.h"
#include "thread-utils.h"
#include <stdio.h>
#include <unistd.h>
#include <stdarg.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <evtlog.h>
Include dependency graph for messages.c:

Classes

struct  MsgContext
 

Macros

#define ADD_THREADID_TAG_TO_EVT_MSGS   0
 

Enumerations

enum  { RECURSE_STATE_OK = 0 , RECURSE_STATE_WATCH = 1 , RECURSE_STATE_SUPPRESS = 2 }
 

Functions

void msg_set_context (LogMessage *msg)
 
void msg_send_formatted_message (int prio, const char *msg)
 
void msg_send_message_printf (int prio, const gchar *fmt,...)
 
void msg_event_send (EVTREC *e)
 
void msg_event_suppress_recursions_and_send (EVTREC *e)
 
void msg_event_print_event_to_stderr (EVTREC *e)
 
EVTREC * msg_event_create (gint prio, const gchar *desc, EVTTAG *tag1,...)
 
EVTREC * msg_event_create_from_desc (gint prio, const char *desc)
 
void msg_event_free (EVTREC *e)
 
void msg_log_func (const gchar *log_domain, GLogLevelFlags log_flags, const gchar *msg, gpointer user_data)
 
void msg_set_post_func (MsgPostFunc func)
 
void msg_post_message (LogMessage *msg)
 
gint msg_map_string_to_log_level (const gchar *log_level)
 
void msg_set_log_level (gint new_log_level)
 
gint msg_get_log_level (void)
 
void msg_apply_cmdline_log_level (gint new_log_level)
 
void msg_apply_config_log_level (gint new_log_level)
 
void msg_init (gboolean interactive)
 
void msg_deinit (void)
 
void msg_add_option_group (GOptionContext *ctx)
 

Variables

gboolean startup_debug_flag = 0
 
gboolean debug_flag = 0
 
gboolean verbose_flag = 0
 
gboolean trace_flag = 0
 
gboolean log_stderr = FALSE
 
gboolean skip_timestamp_on_stderr = FALSE
 

Macro Definition Documentation

◆ ADD_THREADID_TAG_TO_EVT_MSGS

#define ADD_THREADID_TAG_TO_EVT_MSGS   0

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RECURSE_STATE_OK 
RECURSE_STATE_WATCH 
RECURSE_STATE_SUPPRESS 

Function Documentation

◆ msg_add_option_group()

void msg_add_option_group ( GOptionContext *  ctx)

◆ msg_apply_cmdline_log_level()

void msg_apply_cmdline_log_level ( gint  new_log_level)

◆ msg_apply_config_log_level()

void msg_apply_config_log_level ( gint  new_log_level)

◆ msg_deinit()

void msg_deinit ( void  )

◆ msg_event_create()

EVTREC* msg_event_create ( gint  prio,
const gchar *  desc,
EVTTAG *  tag1,
  ... 
)

◆ msg_event_create_from_desc()

EVTREC* msg_event_create_from_desc ( gint  prio,
const char *  desc 
)

◆ msg_event_free()

void msg_event_free ( EVTREC *  e)

◆ msg_event_print_event_to_stderr()

void msg_event_print_event_to_stderr ( EVTREC *  e)

◆ msg_event_send()

void msg_event_send ( EVTREC *  e)

◆ msg_event_suppress_recursions_and_send()

void msg_event_suppress_recursions_and_send ( EVTREC *  e)

◆ msg_get_log_level()

gint msg_get_log_level ( void  )

◆ msg_init()

void msg_init ( gboolean  interactive)

◆ msg_log_func()

void msg_log_func ( const gchar *  log_domain,
GLogLevelFlags  log_flags,
const gchar *  msg,
gpointer  user_data 
)

◆ msg_map_string_to_log_level()

gint msg_map_string_to_log_level ( const gchar *  log_level)

◆ msg_post_message()

void msg_post_message ( LogMessage *  msg)

◆ msg_send_formatted_message()

void msg_send_formatted_message ( int  prio,
const char *  msg 
)

◆ msg_send_message_printf()

void msg_send_message_printf ( int  prio,
const gchar *  fmt,
  ... 
)

◆ msg_set_context()

void msg_set_context ( LogMessage *  msg)

◆ msg_set_log_level()

void msg_set_log_level ( gint  new_log_level)

◆ msg_set_post_func()

void msg_set_post_func ( MsgPostFunc  func)

Variable Documentation

◆ debug_flag

gboolean debug_flag = 0

◆ log_stderr

gboolean log_stderr = FALSE

◆ skip_timestamp_on_stderr

gboolean skip_timestamp_on_stderr = FALSE

◆ startup_debug_flag

gboolean startup_debug_flag = 0

◆ trace_flag

gboolean trace_flag = 0

◆ verbose_flag

gboolean verbose_flag = 0