Janus JSON logger plugin. More...
#include "logger.h"
#include "../debug.h"
#include "../config.h"
#include "../mutex.h"
#include "../utils.h"
Data Structures | |
struct | janus_jsonlog_line |
Macros | |
#define | JANUS_JSONLOG_VERSION 1 |
#define | JANUS_JSONLOG_VERSION_STRING "0.0.1" |
#define | JANUS_JSONLOG_DESCRIPTION "This is a trivial sample logger plugin for Janus, which saves log lines to a local JSON file." |
#define | JANUS_JSONLOG_NAME "JANUS JSON logger plugin" |
#define | JANUS_JSONLOG_AUTHOR "Meetecho s.r.l." |
#define | JANUS_JSONLOG_PACKAGE "janus.logger.jsonlog" |
#define | JANUS_JSONLOG_ERROR_INVALID_REQUEST 411 |
#define | JANUS_JSONLOG_ERROR_MISSING_ELEMENT 412 |
#define | JANUS_JSONLOG_ERROR_INVALID_ELEMENT 413 |
#define | JANUS_JSONLOG_ERROR_UNKNOWN_ERROR 499 |
Typedefs | |
typedef struct janus_jsonlog_line | janus_jsonlog_line |
Functions | |
janus_logger * | create (void) |
int | janus_jsonlog_init (const char *server_name, const char *config_path) |
void | janus_jsonlog_destroy (void) |
int | janus_jsonlog_get_api_compatibility (void) |
int | janus_jsonlog_get_version (void) |
const char * | janus_jsonlog_get_version_string (void) |
const char * | janus_jsonlog_get_description (void) |
const char * | janus_jsonlog_get_name (void) |
const char * | janus_jsonlog_get_author (void) |
const char * | janus_jsonlog_get_package (void) |
void | janus_jsonlog_incoming_logline (int64_t timestamp, const char *line) |
json_t * | janus_jsonlog_handle_request (json_t *request) |
Janus JSON logger plugin.
This is a trivial logger plugin for Janus, which is only there to showcase how you can implement your own external logger for log lines coming from the Janus core or one of the plugins. This specific logger plugin serializes log lines to a JSON object and saves them all to a configured local file.
#define JANUS_JSONLOG_AUTHOR "Meetecho s.r.l." |
#define JANUS_JSONLOG_DESCRIPTION "This is a trivial sample logger plugin for Janus, which saves log lines to a local JSON file." |
#define JANUS_JSONLOG_ERROR_INVALID_ELEMENT 413 |
#define JANUS_JSONLOG_ERROR_INVALID_REQUEST 411 |
#define JANUS_JSONLOG_ERROR_MISSING_ELEMENT 412 |
#define JANUS_JSONLOG_ERROR_UNKNOWN_ERROR 499 |
#define JANUS_JSONLOG_NAME "JANUS JSON logger plugin" |
#define JANUS_JSONLOG_PACKAGE "janus.logger.jsonlog" |
#define JANUS_JSONLOG_VERSION 1 |
#define JANUS_JSONLOG_VERSION_STRING "0.0.1" |
typedef struct janus_jsonlog_line janus_jsonlog_line |
janus_logger * create | ( | void | ) |
void janus_jsonlog_destroy | ( | void | ) |
int janus_jsonlog_get_api_compatibility | ( | void | ) |
const char * janus_jsonlog_get_author | ( | void | ) |
const char * janus_jsonlog_get_description | ( | void | ) |
const char * janus_jsonlog_get_name | ( | void | ) |
const char * janus_jsonlog_get_package | ( | void | ) |
int janus_jsonlog_get_version | ( | void | ) |
const char * janus_jsonlog_get_version_string | ( | void | ) |
void janus_jsonlog_incoming_logline | ( | int64_t | timestamp, |
const char * | line ) |
int janus_jsonlog_init | ( | const char * | server_name, |
const char * | config_path ) |