summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2018-08-20 12:46:16 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2018-08-21 19:26:44 +0100
commit12263aa86a56d5d6a8aa6a9daaf285e24ca2a448 (patch)
tree2e943a4e3ec52bb30c85ea8a95bec53740d9791e
parente0574cb59a15a54466beb2f30eb016ced390bf39 (diff)
Builtin macros for log_selector values
-rw-r--r--doc/doc-docbook/spec.xfpt1
-rw-r--r--doc/doc-txt/NewStuff2
-rw-r--r--src/src/macro_predef.c1
-rw-r--r--src/src/macro_predef.h1
-rw-r--r--src/src/readconf.c13
5 files changed, 18 insertions, 0 deletions
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*/