-
Notifications
You must be signed in to change notification settings - Fork 704
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
[Discussion] Log format of per component log #1509
Comments
@valkey-io/core-team please comment your opinions |
Those I don't think we should change the legacy log messages too much at this point, but we could add a tag when other log formats are used, like JSON or logfmt. For those formats, we could add a tag or something, outside of the message. I suggest we remove the -<Dual Channel> Psync established after rdb load
+Dual channel replication: Psync established after rdb load |
I still don't have much experience in looking at server logs for debugging problems in Valkey, but IMO having the component prefix in log messages is always a good thing. The component prefix should be something that is easy to grep for, and therefore it should be enclosed by some special character. For instance, if |
Worth mentioning this was not backported, so we can still change it. My opinionI think since we have a new log format config
So that it becomes easier to consistently grep on those well defined component names. I will also say, I don't think that Dual channel should be a component, I think replication is a component. I think the components should also be tied to individual log levels, so that you can change the log level of just one of the components (like replication or cluster) without changing the rest of them. |
Looks like #1022 has been merged and it could give us a way to build the new log in a backward compatible way. |
So to summarize the current discussion:
I think this feature is currently not providing a "component" level granularity, but only general application role (replica/AOF/sentinal). We could change the role to indicate a component, but would require us to change/add logging API which will accept component name and set it as a role or we could extend the role with a component (eg replica:networking etc...) @valkey-io/core-team I think 3,4 are something we should probably discuss separately. Do we all agree on 1+2? |
i agree on 1+2 |
I agree with 1+2 as well. |
aligned on 1+2.
I like this idea. I think it will be very useful for debugging.
Yeah, my point is that we can/should extend #1022 with the component. |
…#1586) change the format of the dual channel replication logs so that it will not conflict with existing log formats like modules. Fixes: valkey-io#1509 Signed-off-by: Ran Shidlansik <[email protected]>
…#1586) change the format of the dual channel replication logs so that it will not conflict with existing log formats like modules. Fixes: valkey-io#1509 Signed-off-by: Ran Shidlansik <[email protected]>
Currently we have no strictly defined logging format for different program components (eg replication, cluster-bus, scripting etc...).
In #999 we introduced a unified log format for all Dual-channel related logging which follows the modules semantics, so that every log message is prefixed by '< Dual Channel >'.
Following this there are some concerns that this might be interpreted as if there is some new loadable module (which is not true in case of dual-channel component).
This issue was opened in order to host the discussion of how to format per-component logging.
The text was updated successfully, but these errors were encountered: