[Tarantool-patches] [PATCH v3 1/3] core/say: allow to use json in boot logger
Cyrill Gorcunov
gorcunov at gmail.com
Thu Jul 2 12:50:52 MSK 2020
For some reason in commit 098324556 we've disabled
to use json format in boot time logger. There is
no reason to do so.
Only syslog output format is predefined and must not
be changed, in turn json format is just a decoration
over output stream so we can use it whenever requested.
Part-of #5121
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
src/lib/core/say.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/lib/core/say.c b/src/lib/core/say.c
index 791011e6f..b903cb03f 100644
--- a/src/lib/core/say.c
+++ b/src/lib/core/say.c
@@ -206,17 +206,14 @@ say_set_log_format(enum say_format format)
{
log_format_func_t format_func;
/*
- * When logger type is SAY_LOGGER_BOOT it simply prints
- * every message to stdout intact and can't be formatted.
* SAY_LOGGER_SYSLOG type uses the well-documented and
* *recommended* format described in the RFC below:
* https://tools.ietf.org/html/rfc3164#section-4.1
* Thereby format can't be changed for this type either.
*/
- bool unchangeable = log_default->type == SAY_LOGGER_BOOT ||
- log_default->type == SAY_LOGGER_SYSLOG;
- if (unchangeable)
+ if (log_default->type == SAY_LOGGER_SYSLOG)
return;
+
switch (format) {
case SF_JSON:
format_func = say_format_json;
--
2.26.2
More information about the Tarantool-patches
mailing list