System logging access functions using SYSLOG protocol.
More...
|
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...
|
|
System logging access functions using SYSLOG protocol.
The server supports standard Linux syslog access and also supports vendort-provided syslog access APIs.
◆ cvt_level2syslog_prio()
Convert from log_debug (native) level to syslog priority.
- Parameters
-
- Returns
- Mapping to syslog priority (see syslog.h)
◆ 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
-
recursive | TRUE means this is a recursive callback from print_backtrace() |
level | internal logger "screening" level |
sub_level | internal logger functional (content) level |
fstr | format string in printf format |
args | any additional arguments for printf |
◆ 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.
◆ log_syslog_close()
void log_syslog_close |
( |
void |
| ) |
|
Close down syslog connection.
◆ 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
-
recursive | TRUE means this is a recursive callback from print_backtrace() |
level | YumaPro log level |
sub_level | YumaPro log sub-level |
fstr | format string in printf format |
args | any additional arguments for printf |
◆ log_syslog_connect()
void log_syslog_connect |
( |
void |
| ) |
|
Connect to syslog output stream via openlog()
◆ log_syslog_connected()
boolean log_syslog_connected |
( |
void |
| ) |
|
Return syslog connect status.
- Returns
- TRUE if connected to syslog deamon
◆ log_syslog_flush()
void void log_syslog_flush |
( |
void |
| ) |
|
Flush contents of internal buffer to vendor logging system.
◆ log_syslog_send()
Send log data to syslog via vsyslog()
- Parameters
-
app | YumaPro application (such as netconfd-pro or yangcli-pro) This info is already known to syslog via the connect. |
level | YumaPro log message level. This will be translated appropriately into a syslog equivalent |
fstr | start ptr to format string |
... | va_list |
◆ log_util_flush()
Flush contents of internal buffer to external logging system.
- Parameters
-
desc | pointer to a syslog msg descriptor to flush |
◆ log_util_init_buf()
Initialize the contents of an internal log buffer descriptor.
- Parameters
-
◆ log_util_logbuf_append()
Append formatted string output to an internal log buffer.
- Parameters
-
desc | Pointer to syslog msg buffer descriptor |
app | YumaPro app (like netconfd-pro or yangcli-pro). This will be (or has been) translated by vendor or syslog into an appropriate equivalent. |
level | internal send priority |
sub_level | internal content priority |
fstr | format string in printf format |
args | any additional arguments for printf |
◆ log_util_logbuf_common()
Send formatted string output to an internal log buffer.
- Parameters
-
desc | Pointer to syslog msg buffer descriptor |
app | YumaPro app (like netconfd-pro or yangcli-pro). This will be (or has been) translated by vendor or syslog into an appropriate equivalent. |
level | internal send priority |
sub_level | internal content priority |
fstr | format string in printf format |
args | any additional arguments for printf |