MT#55283 store shared log levels in shared file

And rename .h to .inc

Change-Id: I0e539c52493e061b69c9f61c3992c829b0472ea7
mr26.1
Richard Fuchs 1 month ago
parent 8e6b6feeb8
commit 0a932ff84f

@ -526,7 +526,7 @@ RTPE_CONFIG_ENDPOINT_QUEUE_PARAMS
static void cli_incoming_params_diff(str *instr, struct cli_writer *cw, const cli_handler_t *handler) {
#define ll(system, descr) \
int_diff_print(common.log_levels[log_level_index_ ## system], "log-level-" #system);
#include "loglevels.h"
#include "loglevels.inc"
#undef ll
#define X(v, n) \
@ -537,7 +537,7 @@ SETTABLE_OPTIONS
static void cli_incoming_params_revert(str *instr, struct cli_writer *cw, const cli_handler_t *handler) {
#define ll(system, descr) \
int_revert(common.log_levels[log_level_index_ ## system], "log-level-" #system);
#include "loglevels.h"
#include "loglevels.inc"
#undef ll
#define X(v, n) \

@ -1,13 +1,11 @@
ll(core, "Everything that isn't part of another subsystem")
#include "loglevels_common.inc"
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 negotiation")
ll(rtcp, "RTCP handling")
ll(ice, "ICE negotiation")
ll(crypto, "Negotiation 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")
ll(dtx, "DTX timer/buffer")

@ -249,7 +249,7 @@ void config_load_ext(int *argc, char ***argv, GOptionEntry *app_entries, const c
{ "config-section", 0, 0, G_OPTION_ARG_STRING, &rtpe_common_config_ptr->config_section,"Config file section to use", "STRING" },
{ "log-facility", 0, 0, G_OPTION_ARG_STRING, &rtpe_common_config_ptr->log_facility, "Syslog facility to use for logging", "daemon|local0|...|local7"},
{ "log-level", 'L', 0, G_OPTION_ARG_INT, &rtpe_common_config_ptr->default_log_level,"Default log level", "INT" },
#include "loglevels.h"
#include "loglevels.inc"
{ "log-stderr", 'E', 0, G_OPTION_ARG_NONE, &rtpe_common_config_ptr->log_stderr, "Log on stderr instead of syslog", NULL },
{ "split-logs", 0, 0, G_OPTION_ARG_NONE, &rtpe_common_config_ptr->split_logs, "Split multi-line log messages", NULL },
{ "max-log-line-length",0, 0, G_OPTION_ARG_INT, &rtpe_common_config_ptr->max_log_line_length, "Break log lines at this length","INT" },

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

@ -32,7 +32,7 @@ void __ilog_np(int prio, const char *format, ...) __attribute__ ((format (printf
#define ll(system, descr) log_level_index_ ## system,
enum __loglevels {
#include "loglevels.h"
#include "loglevels.inc"
ll(LAST, NULL)
};
#undef ll

@ -1,7 +1,5 @@
ll(core, "Everything that isn't part of another subsystem")
#include "loglevels_common.inc"
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 negotiation")
ll(internals, "Noisy low-level internals")
ll(dtx, "DTX timer/buffer")

@ -0,0 +1 @@
#include "loglevels_common.inc"

@ -1,13 +1,11 @@
ll(core, "Everything that isn't part of another subsystem")
#include "loglevels_common.inc"
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 negotiation")
ll(rtcp, "RTCP handling")
ll(ice, "ICE negotiation")
ll(crypto, "Negotiation 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")
ll(dtx, "DTX timer/buffer")
Loading…
Cancel
Save