Fork me on GitHub
Data Structures | Macros | Typedefs | Functions
janus_jsonlog.c File Reference

Janus JSON logger plugin. More...

#include "logger.h"
#include "../debug.h"
#include "../config.h"
#include "../mutex.h"
#include "../utils.h"
Include dependency graph for janus_jsonlog.c:

Data Structures

struct  janus_jsonlog_line


#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"


typedef struct janus_jsonlog_line janus_jsonlog_line


janus_loggercreate (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_tjanus_jsonlog_handle_request (json_t *request)

Detailed Description

Janus JSON logger plugin.

Lorenzo Miniero

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.


Macro Definition Documentation


#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_NAME   "JANUS JSON logger plugin"


#define JANUS_JSONLOG_PACKAGE   "janus.logger.jsonlog"





Typedef Documentation

◆ janus_jsonlog_line

Function Documentation

◆ create()

janus_logger* create ( void  )

◆ janus_jsonlog_destroy()

void janus_jsonlog_destroy ( void  )

◆ janus_jsonlog_get_api_compatibility()

int janus_jsonlog_get_api_compatibility ( void  )

◆ janus_jsonlog_get_author()

const char * janus_jsonlog_get_author ( void  )

◆ janus_jsonlog_get_description()

const char * janus_jsonlog_get_description ( void  )

◆ janus_jsonlog_get_name()

const char * janus_jsonlog_get_name ( void  )

◆ janus_jsonlog_get_package()

const char * janus_jsonlog_get_package ( void  )

◆ janus_jsonlog_get_version()

int janus_jsonlog_get_version ( void  )

◆ janus_jsonlog_get_version_string()

const char * janus_jsonlog_get_version_string ( void  )

◆ janus_jsonlog_handle_request()

json_t * janus_jsonlog_handle_request ( json_t request)

◆ janus_jsonlog_incoming_logline()

void janus_jsonlog_incoming_logline ( int64_t  timestamp,
const char *  line 

◆ janus_jsonlog_init()

int janus_jsonlog_init ( const char *  server_name,
const char *  config_path