-
Notifications
You must be signed in to change notification settings - Fork 38
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
Refactor logging component #696
Comments
Also:
|
cthulhu-rider
pushed a commit
to cthulhu-rider/neofs-node
that referenced
this issue
Oct 13, 2022
There is a need to dynamically parameterize `Logger` instances. For example, change severity level. Make `Logger` to encapsulate `zap.Logger` in order to prevent direct assignments. Declare `Level` enumeration for message priorities. Replace `Prm` type with `Config`. Add `Init` method which binds dynamic configuration component which can be later used to modify parameters on the fly. Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
In #1832 I was visited by the idea to unify some widely-used fields of the context. For example, provide
We can also add optional Also we can cover widely-used formats, e.g.
|
cthulhu-rider
pushed a commit
to cthulhu-rider/neofs-node
that referenced
this issue
Oct 20, 2022
There is a need to dynamically parameterize `Logger` instances. For example, change severity level. Make `Logger` to encapsulate `zap.Logger` in order to prevent direct assignments. Declare `Level` enumeration for message priorities. Replace `Prm` type with `Config`. Add `Init` method which binds dynamic configuration component which can be later used to modify parameters on the fly. Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
cthulhu-rider
pushed a commit
to cthulhu-rider/neofs-node
that referenced
this issue
Oct 20, 2022
There is a need to dynamically parameterize `Logger` instances. For example, change severity level. Make `Logger` to encapsulate `zap.Logger` in order to prevent direct assignments. Declare `Level` enumeration for message priorities. Replace `Prm` type with `Config`. Add `Init` method which binds dynamic configuration component which can be later used to modify parameters on the fly. Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
Another proposal: drop |
lets use |
cthulhu-rider
added a commit
to cthulhu-rider/neofs-node
that referenced
this issue
Jul 21, 2023
Nothing foreshadows leaving zap logger in the near future. Closes nspcc-dev#696. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider
added a commit
to cthulhu-rider/neofs-node
that referenced
this issue
Jul 21, 2023
Nothing foreshadows leaving zap logger in the near future. Closes nspcc-dev#696. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We use
zap
logger as a basis of app logger. Currently Logger type is an alias, but this does not seem desirable from the side of the application code. I propose to provide a specific API built on the built-in-Go and NeoFS-specific types, and closezap
in the implementation. This will make it possible to complete the use of a wide range ofzap
features to those that are required specifically for our applications. Also, when changingzap
API or switching to a new fundamental basis, the application code will not be affected.The similar approach was performed for the config types based on
viper
.The text was updated successfully, but these errors were encountered: