meshkit
meshkit copied to clipboard
Set custom log level, and added formatting fields
Description
This PR adds
- formatted fields
- a custom log level to call
- revised Format to account for
Warn
andError
Notes for Reviewers
Signed commits
- [ ] Yes, I signed my commits.
Updating reviewers...
How can i test this changes in my local
@suhail34 You can checkout this branch locally and then in meshery/meshery, point your go.mod to your local meshkit using replace. Then you can start Meshery and see the logs. Since there are new functions that are added, you can try replacing current .Info, .Error functions with these new functions to see how the logs come out.
@nebula-aac It would be nicer if could have some unit tests here.
@nebula-aac Do you have some screenshot examples of how the error logs will look like running it locally?
Hey @Revolyssup I tested this is the ss
I was thinking like if we can do the same as syslogformat and add in setformatter disableTimestamp: true something like this
TerminalLogFormat:
log.SetFormatter(
&logrus.TextFormatter{
DisableTimestamp: true
}
)}
@suhail34 Also test it with Meshery server. I hope the logs don't get too big with 5-6 lines per error/warn log.
I'll have to make some updates on this PR. I'll provide some screenshots
If we want to keep it to the minimum on the logs for mesheryctl
, I would like to know so that I'm not formatting the wrong fields.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@nebula-aac Any updates ?
I think we could define the init funciton and disable the timestamp so that globally all of the logrus has timestamp disabled