TT#97301 add description to log levels

Change-Id: I223d69016b5e6328f1124a6a977c46d008b667dc
pull/1164/head
Richard Fuchs 4 years ago
parent 6602a3a7c5
commit 030f38ff16

@ -385,7 +385,7 @@ static void int_diff_print_sz(long long start_param, void* current_param, size_t
option_string, cw, option)
static void cli_incoming_diff_or_revert(struct cli_writer *cw, char* option) {
#define ll(system) \
#define ll(system, descr) \
int_diff_print(common.log_levels[log_level_index_ ## system], "log-level-" #system);
#include "loglevels.h"
#undef ll
@ -1207,7 +1207,7 @@ static void cli_incoming_list_loglevel(str *instr, struct cli_writer *cw) {
}
static void cli_incoming_list_loglevels(str *instr, struct cli_writer *cw) {
for (unsigned int i = 0; i < num_log_levels; i++)
cw->cw_printf(cw, "%s\n", log_level_names[i]);
cw->cw_printf(cw, "%s - %s\n", log_level_names[i], log_level_descriptions[i]);
}
static void cli_incoming_set_loglevel(str *instr, struct cli_writer *cw) {
int nl;

@ -1,12 +1,12 @@
ll(core)
ll(spandsp)
ll(ffmpeg)
ll(transcoding)
ll(codec)
ll(rtcp)
ll(ice)
ll(crypto)
ll(srtp)
ll(internals)
ll(http)
ll(control)
ll(core, "Everything that isn't part of another subsystem")
ll(spandsp, "Log messages generated by SpanDSP directly")
ll(ffmpeg, "Log messages generated by ffmpeg directly")
ll(transcoding, "Media and RTP transcoding")
ll(codec, "Codec negotation")
ll(rtcp, "RTCP handling")
ll(ice, "ICE negotation")
ll(crypto, "Negotation of SRTP, crypto suites, DTLS, SDES")
ll(srtp, "SRTP encryption and decryption")
ll(internals, "Noisy low-level internals")
ll(http, "HTTP, HTTPS, Websockets")
ll(control, "Control protocols including SDP exchanges, CLI")

@ -141,8 +141,8 @@ void config_load(int *argc, char ***argv, GOptionEntry *app_entries, const char
AUTO_CLEANUP(GKeyFile *kf, free_gkeyfile) = g_key_file_new();
#define ll(system) \
{ "log-level-" #system, 0, 0, G_OPTION_ARG_INT, &rtpe_common_config_ptr->log_levels[log_level_index_ ## system],"Log level for '" #system "'","INT" },
#define ll(system, descr) \
{ "log-level-" #system, 0, 0, G_OPTION_ARG_INT, &rtpe_common_config_ptr->log_levels[log_level_index_ ## system],"Log level for: " descr,"INT" },
GOptionEntry shared_options[] = {
{ "version", 'v', 0, G_OPTION_ARG_NONE, &version, "Print build time and exit", NULL },

@ -31,11 +31,18 @@ write_log_t *write_log = (write_log_t *) log_both;
#define ll(system) #system,
#define ll(system, descr) #system,
const char * const log_level_names[] = {
#include "loglevels.h"
NULL
};
#undef ll
#define ll(system, descr) descr,
const char * const log_level_descriptions[] = {
#include "loglevels.h"
NULL
};
#undef ll

@ -30,16 +30,17 @@ void __ilog_np(int prio, const char *format, ...) __attribute__ ((format (printf
#define ll(system) log_level_index_ ## system,
#define ll(system, descr) log_level_index_ ## system,
enum __loglevels {
#include "loglevels.h"
ll(LAST)
ll(LAST, NULL)
};
#undef ll
#define num_log_levels log_level_index_LAST
extern const char * const log_level_names[];
extern const char * const log_level_descriptions[];
#ifndef __DEBUG

@ -1,2 +1,2 @@
ll(core)
ll(ffmpeg)
ll(core, "Everything that isn't part of another subsystem")
ll(ffmpeg, "Log messages generated by ffmpeg directly")

@ -1,12 +1,12 @@
ll(core)
ll(spandsp)
ll(ffmpeg)
ll(transcoding)
ll(codec)
ll(rtcp)
ll(ice)
ll(crypto)
ll(srtp)
ll(internals)
ll(http)
ll(control)
ll(core, "Everything that isn't part of another subsystem")
ll(spandsp, "Log messages generated by SpanDSP directly")
ll(ffmpeg, "Log messages generated by ffmpeg directly")
ll(transcoding, "Media and RTP transcoding")
ll(codec, "Codec negotation")
ll(rtcp, "RTCP handling")
ll(ice, "ICE negotation")
ll(crypto, "Negotation of SRTP, crypto suites, DTLS, SDES")
ll(srtp, "SRTP encryption and decryption")
ll(internals, "Noisy low-level internals")
ll(http, "HTTP, HTTPS, Websockets")
ll(control, "Control protocols including SDP exchanges, CLI")

Loading…
Cancel
Save