[Tarantool-patches] [PATCH v4 7/8] lua/log: allow to configure logging without a box
Leonid Vasiliev
lvasiliev at tarantool.org
Fri May 29 12:16:08 MSK 2020
Hi!
Maybe we need to apply something like the "observer" pattern.
When changes in "log" occur, it alerts subscribers.
On 29.05.2020 11:53, Oleg Babin wrote:
> Hi! It's ok I think. box.cfg table stores user-defined values.
> But it's a good point. There is an example of similar behaviour[1]:
>
> ```
> tarantool> box.cfg{listen = 0}
> ---
> ...
>
> tarantool> box.cfg.listen
> ---
> - '0'
> ...
>
> tarantool> box.info.listen
> ---
> - '[::]:64991'
> ...
> ```
>
> box.cfg.listen is "0" because you acually specify it by hands.
> box.info.listen is real value of property.
>
> My point in such case don't try to support consistency between box.cfg
> and log.cfg. But:
> - log.cfg should always store an actual value of parameters
> - box.info (maybe, but not box.cfg) should also do it.
>
> I hope it's appropriate stay it as is but file an issue to fix such it
> in future. It won't breaking change for existing installations (that
> doesn't use log.cfg{})
>
> [1] https://github.com/tarantool/tarantool/issues/4620
>
> On 29/05/2020 11:41, Leonid Vasiliev wrote:
> > Hi! Thank you for the patch.
> > See some comments below.
>
> ...
>
> >
> > tarantool> log.cfg{log_level = 2}
> > ---
> > ...
> >
> > tarantool> box.cfg.log_level
> > ---
> > - 3
> > ...
> >
> > tarantool> log.cfg.log_level
> > ---
> > - 2
> > ...
More information about the Tarantool-patches
mailing list