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

Add support for production log levels #1555

Merged
merged 2 commits into from
Jul 14, 2022
Merged

Conversation

leaanthony
Copy link
Member

Allows the developer to set the log level when running in production. Currently hardcoded to ERROR.

@cloudflare-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 413c01a
Status: ✅  Deploy successful!
Preview URL: https://0113ec70.wails-website.pages.dev
Branch Preview URL: https://feature-production-log-level.wails-website.pages.dev

View logs

@leaanthony leaanthony merged commit f068c33 into master Jul 14, 2022
@leaanthony leaanthony deleted the feature/production_log_level branch July 14, 2022 11:45
if !IsDebug() {
myLogger.SetLogLevel(pkgLog.ERROR)
}
myLogger.SetLogLevel(appoptions.LogLevelProduction)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't this change the log level always to the production one, even when using '--debug' build?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, yeah, nice catch. It should be using the standard level defined for that else this ☝️

Copy link
Member Author

Choose a reason for hiding this comment

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

Pushed fix to master. Thanks for picking that up!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Awesome thanks 🚀

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.

None yet

2 participants