#include <limits.h>
#include <stdio.h>
#include <stdarg.h>
#include <fcntl.h>
#include <stdlib.h>
#include <inttypes.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <signal.h>
#include <time.h>
#include "spandsp/telephony.h"
#include "spandsp/logging.h"
Functions | |
int | span_log_test (logging_state_t *s, int level) |
Test if logging of a specified severity level is enabled. | |
int | span_log (logging_state_t *s, int level, const char *format,...) |
Generate a log entry. | |
int | span_log_buf (logging_state_t *s, int level, const char *tag, const uint8_t *buf, int len) |
Generate a log entry displaying the contents of a buffer. | |
int | span_log_init (logging_state_t *s, int level, const char *tag) |
int | span_log_set_protocol (logging_state_t *s, const char *protocol) |
void | span_set_message_handler (void(*func)(int level, const char *text)) |
void | span_set_error_handler (void(*func)(const char *text)) |
int span_log | ( | logging_state_t * | s, | |
int | level, | |||
const char * | format, | |||
... | ||||
) |
Generate a log entry.
Generate a log entry.
s | The logging context. | |
level | The severity level of the entry. | |
format | ??? |
int span_log_buf | ( | logging_state_t * | s, | |
int | level, | |||
const char * | tag, | |||
const uint8_t * | buf, | |||
int | len | |||
) |
Generate a log entry displaying the contents of a buffer.
Generate a log entry displaying the contents of a buffer.
s | The logging context. | |
level | The severity level of the entry. | |
tag | A label for the log entry. | |
buf | The buffer to be dumped to the log. | |
len | The length of buf. |
int span_log_test | ( | logging_state_t * | s, | |
int | level | |||
) |
Test if logging of a specified severity level is enabled.
Test if logging of a specified severity level is enabled.
s | The logging context. | |
level | The severity level to be tested. |