diff --git a/daemon/cli.c b/daemon/cli.c index 1f1363c0c..b4fdc932c 100644 --- a/daemon/cli.c +++ b/daemon/cli.c @@ -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) \ diff --git a/daemon/private/loglevels.h b/daemon/private/loglevels.inc similarity index 72% rename from daemon/private/loglevels.h rename to daemon/private/loglevels.inc index 433496688..67fed4ebf 100644 --- a/daemon/private/loglevels.h +++ b/daemon/private/loglevels.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") diff --git a/lib/auxlib.c b/lib/auxlib.c index fd8d53cf5..e1874f7c6 100644 --- a/lib/auxlib.c +++ b/lib/auxlib.c @@ -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" }, diff --git a/recording-daemon/loglevels.h b/lib/loglevels_common.inc similarity index 100% rename from recording-daemon/loglevels.h rename to lib/loglevels_common.inc diff --git a/lib/loglib.c b/lib/loglib.c index 24ccc4607..8cf971c1c 100644 --- a/lib/loglib.c +++ b/lib/loglib.c @@ -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 diff --git a/lib/loglib.h b/lib/loglib.h index 3c4eee9fd..8c5b7621d 100644 --- a/lib/loglib.h +++ b/lib/loglib.h @@ -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 diff --git a/perf-tester/loglevels.h b/perf-tester/loglevels.inc similarity index 50% rename from perf-tester/loglevels.h rename to perf-tester/loglevels.inc index cd028449a..39680539f 100644 --- a/perf-tester/loglevels.h +++ b/perf-tester/loglevels.inc @@ -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") diff --git a/recording-daemon/loglevels.inc b/recording-daemon/loglevels.inc new file mode 100644 index 000000000..0f4eaebd9 --- /dev/null +++ b/recording-daemon/loglevels.inc @@ -0,0 +1 @@ +#include "loglevels_common.inc" diff --git a/t/loglevels.h b/t/loglevels.inc similarity index 72% rename from t/loglevels.h rename to t/loglevels.inc index 433496688..67fed4ebf 100644 --- a/t/loglevels.h +++ b/t/loglevels.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")