[Tarantool-patches] [PATCH v7 07/11] lua/log: use log module settings inside box.cfg
Cyrill Gorcunov
gorcunov at gmail.com
Tue Jun 2 11:15:31 MSK 2020
On Tue, Jun 02, 2020 at 10:51:28AM +0300, Oleg Babin wrote:
> Hi! Thanks for your patch.
>
> I've found a strange case:
> ```
> tarantool> log.cfg({log = '1.txt'})
> ---
> ...
>
> tarantool> log.cfg({log = '2.txt'}) -- error - OK
> ---
> - error: 'builtin/log.lua:273: log: ''log'' can''t be set dynamically'
> ...
>
> tarantool> box.cfg{log = '2.txt'} -- no error (why?)
> ---
> ...
>
> tarantool> log.error('test')
> ---
> ...
> ```
>
> log.cfg and box.cfg shows:
> ```
> tarantool> log.cfg.log
> ---
> - 2.txt
> ...
>
> tarantool> box.cfg.log
> ---
> - 2.txt
> ...
> ```
>
> But actually "1.txt" is my log file.
> Also I suggest to cover such situation with a test :)
Good catch! Yes, I need to revisit this moment. Thanks!!!
More information about the Tarantool-patches
mailing list