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

Updated Meshkit logger docs #11202

Merged
merged 11 commits into from
Jul 1, 2024
2 changes: 1 addition & 1 deletion docs/pages/project/contributing/contributing-error.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ var (
func main() {
log, err := logger.New("test", logger.Options{
Copy link
Contributor

@singh1203 singh1203 Jun 20, 2024

Choose a reason for hiding this comment

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

@Aviral0702 You can take a look to this example set the logLevel from here

Format: logger.SyslogLogFormat,
DebugLevel: true,
LogLevel: logLevel,
Copy link
Contributor

Choose a reason for hiding this comment

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

@Aviral0702 Good job utilizing the loglevel here, but do you know what it is? Is it a variable or a string?

If it is a variable, does it have a value assigned to it?
Answer: Refer to the example provided under the issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, It is an integer. First of all it is assigned with the value of LOG_LEVEL and there is a check for DEBUG_LEVEL which returns a bool value if it comes out to be true then then the value of logLevel is assigned with the value of debugLevel.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done with the help of Viper framework of Golang.

})
if err != nil {
fmt.Println(err)
Expand Down
Loading