From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 31 Jul 2018 15:06:05 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] [PATCH 0/1] Fixed non-informative error messages for log conf Message-ID: <20180731120605.mcckzqagp5g6k7d7@esperanza> References: <20180730135801.91226-1-arkholga@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180730135801.91226-1-arkholga@tarantool.org> To: Olga Arkhangelskaia Cc: tarantool-patches@freelists.org List-ID: 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(-)