Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logger: add encoding config option #2999

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

End-rey
Copy link
Contributor

@End-rey End-rey commented Nov 5, 2024

Closes #2982.

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 64.70588% with 6 lines in your changes missing coverage. Please review.

Project coverage is 23.17%. Comparing base (2e583e5) to head (4bf94da).

Files with missing lines Patch % Lines
cmd/neofs-node/validate.go 25.00% 2 Missing and 1 partial ⚠️
cmd/neofs-node/config.go 0.00% 2 Missing ⚠️
cmd/neofs-ir/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2999      +/-   ##
==========================================
+ Coverage   23.15%   23.17%   +0.01%     
==========================================
  Files         789      789              
  Lines       58815    58830      +15     
==========================================
+ Hits        13619    13633      +14     
- Misses      44312    44313       +1     
  Partials      884      884              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@End-rey End-rey self-assigned this Nov 5, 2024
Copy link
Member

@carpawell carpawell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also validate that we have read something OK near this:

_, err := zapcore.ParseLevel(loggerconfig.Level(c))
if err != nil {
return fmt.Errorf("invalid logger level: %w", err)
}

Add a new config option for the logger encoding, which could be `console` or
`json`. Update examples, doc and tests.

Closes #2982.

Signed-off-by: Andrey Butusov <andrey@nspcc.io>
@End-rey End-rey force-pushed the 2982-optional-json-logs-encoding branch from bea32f3 to 4bf94da Compare November 5, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optional JSON logs encoding
3 participants