[exim-cvs] Builtin macros for log_selector values

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Exim Git Commits Mailing List
Dátum:  
Címzett: exim-cvs
Tárgy: [exim-cvs] Builtin macros for log_selector values
Gitweb: https://git.exim.org/exim.git/commitdiff/12263aa86a56d5d6a8aa6a9daaf285e24ca2a448
Commit:     12263aa86a56d5d6a8aa6a9daaf285e24ca2a448
Parent:     e0574cb59a15a54466beb2f30eb016ced390bf39
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Mon Aug 20 12:46:16 2018 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Tue Aug 21 19:26:44 2018 +0100


    Builtin macros for log_selector values
---
 doc/doc-docbook/spec.xfpt |  1 +
 doc/doc-txt/NewStuff      |  2 ++
 src/src/macro_predef.c    |  1 +
 src/src/macro_predef.h    |  1 +
 src/src/readconf.c        | 13 +++++++++++++
 5 files changed, 18 insertions(+)


diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index ff945ee..a9b5d96 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 e22f759..dd2645d 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 1073e45..0a22eec 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 50b61a8..7eeaa96 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 bf024ef..875e032 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*/