From: Jeremy Harris Date: Mon, 20 Aug 2018 11:46:16 +0000 (+0100) Subject: Builtin macros for log_selector values X-Git-Tag: exim-4.92-RC1~130 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=12263aa86a56d5d6a8aa6a9daaf285e24ca2a448;p=exim.git Builtin macros for log_selector values --- diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index ff945eebd..a9b5d968e 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -5076,6 +5076,7 @@ The following classes of macros are defined: &` _DRIVER_ROUTER_* `& router drivers &` _DRIVER_TRANSPORT_* `& transport drivers &` _DRIVER_AUTHENTICATOR_* `& authenticator drivers +&` _LOG_* `& log_selector values &` _OPT_MAIN_* `& main config options &` _OPT_ROUTERS_* `& generic router options &` _OPT_TRANSPORTS_* `& generic transport options diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff index e22f759c7..dd2645d86 100644 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@ -23,6 +23,8 @@ Version 4.92 5. A "pipelining" log_selector. + 6. Builtin macros for supported log_selector values. + Version 4.91 -------------- diff --git a/src/src/macro_predef.c b/src/src/macro_predef.c index 1073e45a6..0a22eec2f 100644 --- a/src/src/macro_predef.c +++ b/src/src/macro_predef.c @@ -284,6 +284,7 @@ options_main(); options_routers(); options_transports(); options_auths(); +options_logging(); } static void diff --git a/src/src/macro_predef.h b/src/src/macro_predef.h index 50b61a897..7eeaa9692 100644 --- a/src/src/macro_predef.h +++ b/src/src/macro_predef.h @@ -18,5 +18,6 @@ extern void options_main(void); extern void options_routers(void); extern void options_transports(void); extern void options_auths(void); +extern void options_logging(void); extern void params_dkim(void); diff --git a/src/src/readconf.c b/src/src/readconf.c index bf024efc9..875e03222 100644 --- a/src/src/readconf.c +++ b/src/src/readconf.c @@ -409,6 +409,19 @@ for (ai = auths_available; ai->driver_name[0]; ai++) } } +void +options_logging(void) +{ +bit_table * bp; +uschar buf[64]; + +for (bp = log_options; bp < log_options + log_options_count; bp++) + { + spf(buf, sizeof(buf), US"_LOG_%T", bp->name); + builtin_macro_create(buf); + } +} + #else /*!MACRO_PREDEF*/