[Tarantool-patches] [PATCH] lua/log: accept symbolic logging levels
Cyrill Gorcunov
gorcunov at gmail.com
Thu May 27 13:17:57 MSK 2021
On Thu, May 27, 2021 at 12:04:31PM +0300, Alexander Turenko wrote:
>
> > +-- Test symbolic names for loglevels
> > +_, err = pcall(log.cfg, {level='fatal'})
> > +test:ok(err == nil and log.cfg.level == 0, 'both got fatal')
>
> Now I noticed one difference from box.cfg() behaviour:
>
> | tarantool> box.cfg{log_level = 'verbose'}
> | tarantool> box.cfg.log_level
> | ---
> | - verbose
> | ...
>
> | tarantool> log = require('log')
> | tarantool> log.cfg{level = 'verbose'}
> | tarantool> log.cfg.level
> | ---
> | - 6
> | ...
>
> AFAIU, box.cfg.foo generally returns the same that a user provides in
> box.cfg({foo = <...>}), without normalization.
Well, as to me this looks somehow inconvenient and worth to implement
symbolic output for log leves I think. As a separate feature.
More information about the Tarantool-patches
mailing list