Skip to content

Commit

Permalink
fix dev mode logging bug
Browse files Browse the repository at this point in the history
changelog.md

retain env support
  • Loading branch information
atterpac committed Dec 30, 2024
1 parent 82fd9de commit bfb292e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
10 changes: 1 addition & 9 deletions v2/internal/app/app_dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"github.com/wailsapp/wails/v2/internal/fs"
"github.com/wailsapp/wails/v2/internal/logger"
"github.com/wailsapp/wails/v2/internal/menumanager"
pkglogger "github.com/wailsapp/wails/v2/pkg/logger"
"github.com/wailsapp/wails/v2/pkg/options"
)

Expand Down Expand Up @@ -93,6 +92,7 @@ func CreateApp(appoptions *options.App) (*App, error) {
}
if loglevelFlag != nil {
loglevel = *loglevelFlag
logger.SetLogLevel(loglevel)
}
}

Expand Down Expand Up @@ -169,14 +169,6 @@ func CreateApp(appoptions *options.App) (*App, error) {
ctx = context.WithValue(ctx, "devserver", devServer)
}

if loglevel != "" {
level, err := pkglogger.StringToLogLevel(loglevel)
if err != nil {
return nil, err
}
myLogger.SetLogLevel(level)
}

// Attach logger to context
ctx = context.WithValue(ctx, "logger", myLogger)
ctx = context.WithValue(ctx, "buildtype", "dev")
Expand Down
1 change: 1 addition & 0 deletions website/src/pages/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added option to set window class name on Windows. Added in [PR](https://github.com/wailsapp/wails/pull/3828) by @APshenkin

### Fixed
- Fixed dev mode logging bug by @attperac in [#3972](https://wailsapp/wails/pull/3972)
- Fixed cross compilation failed with CGO [PR](https://github.com/wailsapp/wails/pull/3795) by [@fcying](https://github.com/fcying)
- Using go-webview2 v0.1.17 to fix native webview2loader issue, by @leaanthony
- Fixed example for macOS menu by @takuyahara in [PR](https://github.com/wailsapp/wails/pull/3847)
Expand Down

0 comments on commit bfb292e

Please sign in to comment.