The logger plugin session and callbacks interface. More...
#include <logger.h>
Data Fields | |
int(*const | init )(const char *server_name, const char *config_path) |
Logger plugin initialization/constructor. | |
void(*const | destroy )(void) |
Logger plugin deinitialization/destructor. | |
int(*const | get_api_compatibility )(void) |
Informative method to request the API version this logger plugin was compiled against. | |
int(*const | get_version )(void) |
Informative method to request the numeric version of the logger plugin. | |
const char *(*const | get_version_string )(void) |
Informative method to request the string version of the logger plugin. | |
const char *(*const | get_description )(void) |
Informative method to request a description of the logger plugin. | |
const char *(*const | get_name )(void) |
Informative method to request the name of the logger plugin. | |
const char *(*const | get_author )(void) |
Informative method to request the author of the logger plugin. | |
const char *(*const | get_package )(void) |
Informative method to request the package name of the logger plugin (what will be used in web applications to refer to it) | |
void(*const | incoming_logline )(int64_t timestamp, const char *line) |
Method to notify the logger plugin that a new log line is available. | |
json_t *(*const | handle_request )(json_t *request) |
Method to send a request to this specific logger plugin. | |
The logger plugin session and callbacks interface.
void(*const janus_logger::destroy) (void) |
Logger plugin deinitialization/destructor.
int(*const janus_logger::get_api_compatibility) (void) |
Informative method to request the API version this logger plugin was compiled against.
const char *(*const janus_logger::get_author) (void) |
Informative method to request the author of the logger plugin.
const char *(*const janus_logger::get_description) (void) |
Informative method to request a description of the logger plugin.
const char *(*const janus_logger::get_name) (void) |
Informative method to request the name of the logger plugin.
const char *(*const janus_logger::get_package) (void) |
Informative method to request the package name of the logger plugin (what will be used in web applications to refer to it)
int(*const janus_logger::get_version) (void) |
Informative method to request the numeric version of the logger plugin.
const char *(*const janus_logger::get_version_string) (void) |
Informative method to request the string version of the logger plugin.
Method to send a request to this specific logger plugin.
The method takes a Jansson json_t, that contains all the info related to the request. This object will come from an Admin API request, and is meant to represent a synchronous request. Since each logger can have its own bells and whistles, there's no constraint on what this object should contain, which is entirely logger-specific. A json_t object needs to be returned as a response, which will be sent in response to the Admin API call. This can be useful to tweak settings in real-time, or to probe the internals of the logger plugin for monitoring purposes.
[in] | request | Jansson object containing the request |
void(*const janus_logger::incoming_logline) (int64_t timestamp, const char *line) |
Method to notify the logger plugin that a new log line is available.
All log lines are notified as a string
[in] | timestamp | Monotonic timestamp of when the log line was printed |
[in] | line | String containing the log line |
int(*const janus_logger::init) (const char *server_name, const char *config_path) |
Logger plugin initialization/constructor.
[in] | server_name | Name of the Janus instance generating the logs |
[in] | config_path | Path of the folder where the configuration for this logger plugin can be found |