Commit graph

6 commits

Author SHA1 Message Date
Alex Vanin
a2547da5ae [#493] cmd/node: Fix linter errors in config
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-06-02 16:07:42 +03:00
Alex Vanin
25a13d3611 [#493] cmd/node: Add .env file for tests
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-06-01 15:29:08 +03:00
Leonard Lyubich
3b797d7957 [#493] node/config/logger: Simplify approach to read the level
Dedicated type `LoggerSection` turned out to be redundant since it doesn't
do a hidden logic and just uses `config.Config` API.

Remove `LoggerSection` type and implement `Level` which do the same.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-01 11:45:38 +03:00
Leonard Lyubich
be6898a51d [#493] node/config/logger: Cover ENV variables with unit test
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-01 11:45:38 +03:00
Leonard Lyubich
e5c014bbfb [#493] node/config/logger: Write unit tests
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-01 11:45:38 +03:00
Leonard Lyubich
c645781b98 [#493] node/config: Implement logger section
Create `logger` sub-package of `config` package. Implement `LoggerSection`
type of logger sub-section. Add `Level` method to read logger level config
value. Default level is `info`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-01 11:45:38 +03:00