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

Abundant console logs after updating to 2.10 #4111

Open
pilsnerbeer opened this issue Mar 4, 2025 · 1 comment · May be fixed by #4182
Open

Abundant console logs after updating to 2.10 #4111

pilsnerbeer opened this issue Mar 4, 2025 · 1 comment · May be fixed by #4182
Labels
Bug Something isn't working

Comments

@pilsnerbeer
Copy link

Description

Right after updating to wails 2.10 and making no changes I see plenty of console logs such as: (when running wails dev)

2025/03/04 17:23:15 Saving tokens TRA | json call result data: {"result":{"error":"","task":{"_id":"67ade80036578789528c2a26","taskN...
TRA | json call result data: {"result":true,"error":null,"callbackid":"main.App.GetAuthenticationStatus-4061225993"}

and so on (these are results coming from calling wails Go backend functions)
I also see bytes or any other data being sent to front-end (I dont manually log these). basically any time FE makes a call the result it also output to console

wails -loglevel does not affect this

in wails2.9 I did not see such console logs. Given that some functions return big responses this completely floods the console and makes it difficult to read actual logs.

To Reproduce

  • Update to wails2.10
  • run the "wails dev" command

Expected behaviour

I did not expect these logs as they were never there

Screenshots

No response

Attempted Fixes

Tried adjusting loglevel

System Details

# Wails
Version | v2.10.1


# System
┌──────────────────────────────────────────────────────────────────────────────────────────────┐
| OS           | Windows 10 Home                                                               |
| Version      | 2009 (Build: 26100)                                                           |
| ID           | 24H2                                                                          |
| Go Version   | go1.24.0                                                                      |
| Platform     | windows                                                                       |
| Architecture | amd64                                                                         |
| CPU          | AMD Ryzen 5 5600H with Radeon Graphics                                      
  |
| GPU 1        | NVIDIA GeForce RTX 3060 Laptop GPU (NVIDIA) - Driver: 32.0.15.7216          
  |
| GPU 2        | AMD Radeon(TM) Graphics (Advanced Micro Devices, Inc.) - Driver: 31.0.12044.3 |
| Memory       | 32GB                                                                        
  |
└──────────────────────────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌───────────────────────────────────────────────────────┐
| Dependency | Package Name | Status    | Version       |
| WebView2   | N/A          | Installed | 133.0.3065.92 |
| Nodejs     | N/A          | Installed | 22.11.0       |
| npm        | N/A          | Installed | 10.9.0        |
| *upx       | N/A          | Available |               |
| *nsis      | N/A          | Installed | v3.10         |
|                                                       |
└─────────────── * - Optional Dependency ───────────────┘

Additional context

No response

@pilsnerbeer pilsnerbeer added the Bug Something isn't working label Mar 4, 2025
@superDingda
Copy link

superDingda commented Mar 5, 2025

@leaanthony This PR (#3972) caused the current issue. The LogLevel in options.App may carry a value of 0, leading to an invalid value in myLogger.SetLogLevel(appoptions.LogLevel). This 0 value is smaller than any valid log level, causing the logging control parameters to fail. Before this change, the code was correct.

This code is also inappropriate.

// String returns the string representation of the LogLevel
func (l LogLevel) String() string {
	switch l {
	case TRACE:
		return "trace"
	case DEBUG:
		return "debug"
	case INFO:
		return "info"
	case WARNING:
		return "warning"
	case ERROR:
		return "error"
	default:
		return "debug"   // LogLevel == 0 return debug ? l.logLevel <= logger.TRACE ?
	}
}

#4082

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants