yumapro  24.10-2
YumaPro SDK
Loading...
Searching...
No Matches

System logging access functions using SYSLOG protocol. More...

Collaboration diagram for SYSLOG:

Data Structures

struct  syslog_msg_desc_t
 Syslog/Vendor Message Buffer descriptor. More...
 

Functions

void log_syslog_close (void)
 Close down syslog connection. More...
 
void log_syslog_cleanup (void)
 Cleanup syslog related logging state, if any. More...
 
int cvt_level2syslog_prio (log_debug_t level)
 Convert from log_debug (native) level to syslog priority. More...
 
boolean log_syslog_connected (void)
 Return syslog connect status. More...
 
void log_syslog_connect (void)
 Connect to syslog output stream via openlog() More...
 
void log_syslog_send (log_debug_app_t app, log_debug_t level, const char *fstr,...) __attribute__((format(printf
 Send log data to syslog via vsyslog() More...
 
void void log_syslog_flush (void)
 Flush contents of internal buffer to vendor logging system. More...
 
void log_syslog_common (boolean recursive, log_debug_t level, log_debug_t sub_level, const char *fstr, va_list args)
 Generate a log entry destined for vendor specific processing. More...
 
void log_syslog_append (boolean recursive, log_debug_t level, log_debug_t sub_level, const char *fstr, va_list args)
 Append formatted string output to the internal syslog log buffer. More...
 
void log_util_init_buf (syslog_msg_desc_t *dp)
 Initialize the contents of an internal log buffer descriptor. More...
 
void log_util_flush (syslog_msg_desc_t *desc)
 Flush contents of internal buffer to external logging system. More...
 
void log_util_logbuf_common (syslog_msg_desc_t *desc, log_debug_app_t app, log_debug_t level, log_debug_t sub_level, const char *fstr, va_list args)
 Send formatted string output to an internal log buffer. More...
 
void log_util_logbuf_append (syslog_msg_desc_t *desc, log_debug_app_t app, log_debug_t level, log_debug_t sub_level, const char *fstr, va_list args)
 Append formatted string output to an internal log buffer. More...
 

Detailed Description

System logging access functions using SYSLOG protocol.

The server supports standard Linux syslog access and also supports vendort-provided syslog access APIs.

Function Documentation

◆ cvt_level2syslog_prio()

int cvt_level2syslog_prio ( log_debug_t  level)

Convert from log_debug (native) level to syslog priority.

Parameters
levelNative debug level
Returns
Mapping to syslog priority (see syslog.h)
Here is the caller graph for this function:

◆ log_syslog_append()

void log_syslog_append ( boolean  recursive,
log_debug_t  level,
log_debug_t  sub_level,
const char *  fstr,
va_list  args 
)

Append formatted string output to the internal syslog log buffer.

Parameters
recursiveTRUE means this is a recursive callback from print_backtrace()
levelinternal logger "screening" level
sub_levelinternal logger functional (content) level
fstrformat string in printf format
argsany additional arguments for printf
Here is the call graph for this function:

◆ log_syslog_cleanup()

void log_syslog_cleanup ( void  )

Cleanup syslog related logging state, if any.

Note: Invocation should be delayed to the LAST POSSIBLE MOMENT. This is because the various cleanup routines often want to log errors/warnings/info as well various debugs using standard logging.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log_syslog_close()

void log_syslog_close ( void  )

Close down syslog connection.

Here is the caller graph for this function:

◆ log_syslog_common()

void log_syslog_common ( boolean  recursive,
log_debug_t  level,
log_debug_t  sub_level,
const char *  fstr,
va_list  args 
)

Generate a log entry destined for vendor specific processing.

Parameters
recursiveTRUE means this is a recursive callback from print_backtrace()
levelYumaPro log level
sub_levelYumaPro log sub-level
fstrformat string in printf format
argsany additional arguments for printf
Here is the call graph for this function:

◆ log_syslog_connect()

void log_syslog_connect ( void  )

Connect to syslog output stream via openlog()

Here is the caller graph for this function:

◆ log_syslog_connected()

boolean log_syslog_connected ( void  )

Return syslog connect status.

Returns
TRUE if connected to syslog deamon
Here is the caller graph for this function:

◆ log_syslog_flush()

void void log_syslog_flush ( void  )

Flush contents of internal buffer to vendor logging system.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log_syslog_send()

void log_syslog_send ( log_debug_app_t  app,
log_debug_t  level,
const char *  fstr,
  ... 
)

Send log data to syslog via vsyslog()

Parameters
appYumaPro application (such as netconfd-pro or yangcli-pro) This info is already known to syslog via the connect.
levelYumaPro log message level. This will be translated appropriately into a syslog equivalent
fstrstart ptr to format string
...va_list

◆ log_util_flush()

void log_util_flush ( syslog_msg_desc_t desc)

Flush contents of internal buffer to external logging system.

Parameters
descpointer to a syslog msg descriptor to flush
Here is the caller graph for this function:

◆ log_util_init_buf()

void log_util_init_buf ( syslog_msg_desc_t dp)

Initialize the contents of an internal log buffer descriptor.

Parameters
dpaddr of descriptor
Here is the caller graph for this function:

◆ log_util_logbuf_append()

void log_util_logbuf_append ( syslog_msg_desc_t desc,
log_debug_app_t  app,
log_debug_t  level,
log_debug_t  sub_level,
const char *  fstr,
va_list  args 
)

Append formatted string output to an internal log buffer.

Parameters
descPointer to syslog msg buffer descriptor
appYumaPro app (like netconfd-pro or yangcli-pro). This will be (or has been) translated by vendor or syslog into an appropriate equivalent.
levelinternal send priority
sub_levelinternal content priority
fstrformat string in printf format
argsany additional arguments for printf
Here is the caller graph for this function:

◆ log_util_logbuf_common()

void log_util_logbuf_common ( syslog_msg_desc_t desc,
log_debug_app_t  app,
log_debug_t  level,
log_debug_t  sub_level,
const char *  fstr,
va_list  args 
)

Send formatted string output to an internal log buffer.

Parameters
descPointer to syslog msg buffer descriptor
appYumaPro app (like netconfd-pro or yangcli-pro). This will be (or has been) translated by vendor or syslog into an appropriate equivalent.
levelinternal send priority
sub_levelinternal content priority
fstrformat string in printf format
argsany additional arguments for printf
Here is the caller graph for this function: