fix(logger): respect log level from environment variable in dev mode (#4083)

* fix(logger): respect log level from environment variable in dev mode

* chore: add entry to changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
Mehdi 2025-05-05 18:09:34 +09:00 committed by GitHub
commit 6af1028856
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -79,9 +79,11 @@ func CreateApp(appoptions *options.App) (*App, error) {
}
loglevel := os.Getenv("loglevel")
if loglevel == "" {
loglevelFlag = devFlags.String("loglevel", appoptions.LogLevel.String(), "Loglevel to use - Trace, Debug, Info, Warning, Error")
appLogLevel := appoptions.LogLevel.String()
if loglevel != "" {
appLogLevel = loglevel
}
loglevelFlag = devFlags.String("loglevel", appLogLevel, "Loglevel to use - Trace, Debug, Info, Warning, Error")
// If we weren't given the assetdir in the environment variables
if assetdir == "" {

View file

@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed [listenerOff issue](https://github.com/wailsapp/wails/issues/3850) by @leaanthony.
- Fixed [logger issue](https://github.com/wailsapp/wails/issues/4082) by @meeehdi-dev.
- Fixed issues building with `darwin/universal` target by @leaanthony.
## v2.10 - 2025-02-15