config: add logger wrapper with JSON encoding
The future config module works with hierarchical data a lot and needs a way to show a table as a part a log message. The config module issues log messages at different log levels and it is undesirable to perform JSON encoding for messages that will be filtered out by the current log level. It is complicated to achieve the goal using the `log` module. Let's add a wrapper as the temporary solution. The wrapper can be eliminated after solving the problems in the `log` module that are linked in the wrapper's code. The wrapper also simplifies debugging of the config module itself. NO_DOC=the module is for internal use from the config code NO_CHANGELOG=see NO_DOC
Showing
- src/box/CMakeLists.txt 5 additions, 0 deletionssrc/box/CMakeLists.txt
- src/box/lua/config/utils/log.lua 156 additions, 0 deletionssrc/box/lua/config/utils/log.lua
- src/box/lua/init.c 13 additions, 1 deletionsrc/box/lua/init.c
- test/config-luatest/log_wrapper_test.lua 160 additions, 0 deletionstest/config-luatest/log_wrapper_test.lua
- test/config-luatest/suite.ini 3 additions, 0 deletionstest/config-luatest/suite.ini
Loading
Please register or sign in to comment