[tarantool-patches] [PATCH 0/1] Fixed non-informative error messages for log conf
Vladimir Davydov
vdavydov.dev at gmail.com
Tue Jul 31 15:06:05 MSK 2018
There's no point in a cover-letter if you're submitting a single patch.
You can include the text below either in the commit message or just put
it in the patch email after '---' if you don't want it in the git log.
On Mon, Jul 30, 2018 at 04:58:00PM +0300, Olga Arkhangelskaia wrote:
> Tarantool log used to have more serious problems than non-informative messages:
> No check on parameters like log_nonblock, log_format in case of unconfigured log.
> This means that there was a possibility to set any value in case when the
> first log conf. commands were:
> box.cfg{log_format = ‘any’}
> box.cfg{log_nonblock=true} - (together with stderr)
> In case of log_format with such scenario additional problem took place.
> When setting log format we change format_func
> (function that actually logs to log) to NULL, and wrong log_format
> lead to crash - because we could not log error with log format because of
> format_func was not set yet, but already had been changed to null.
> In case of undefined log type (“log=’:test:’:) we used to have empty
> exception - so,tarantool just silently crashed.
> I think the main problem that initial initialization is mixed up with
> configuring parameters. So if we decide to refactor log we need to separate
> them. For example, have set of checking functions and set of configuring.
> One parameter - one check.
> End initial initialization should use the same way prior setting any parameter.
>
> Patch fixes this problems using the easiest way, however if in future we need
> some more parameters - we should consider the idea of refactor.
>
> Olga Arkhangelskaia (1):
> Fixed non-informative error messages for log conf.
>
> src/box/box.cc | 25 ++++++++++++++++++-------
> src/say.c | 22 +++++++++++++++-------
> src/say.h | 4 +++-
> test/box-tap/cfg.test.lua | 2 +-
> 4 files changed, 37 insertions(+), 16 deletions(-)
More information about the Tarantool-patches
mailing list