PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

Consistent logging directory and easy wasy to disable all logging

Open hellbringer opened this issue 2 years ago • 5 comments

Description of the new feature / enhancement

Logs are now created in: C:\Users<username>\Appdata\Local\PowerToys<Function/tool/toy>\Logs\v0.70.1*.txt C:\Users<username>\Appdata\Local\PowerToys<Function/tool/toy>\Logs\0.70.1.0*.txt C:\Users<username>\Appdata\Local\PowerToys<Function/tool/toy>\Logs*.txt C:\Users<username>\Appdata\Local\PowerToys<Function/tool/toy>\LogsModuleInterface*.txt C:\Users<username>\Appdata\Local\PowerToys<Function/tool/toy>\ModuleInterface\Logs*.txt C:\Users<username>\Appdata\Local\PowerToys<Function/tool/toy><Function/tool/toy>\Logs\v0.70.1*.txt C:\Users<username>\Appdata\Local\PowerToys\RunnerLogs*.txt

This adds up to a lot of different directory's with a lot of old log files that nobody is every going to read. logging

Scenario when this would be used?

Multi-user systems, sysadmins that need to debug a logfile.

Supporting information

One system with 10 users, 2MB of log files per user per day, that's 600MB in a month or 7.2GB in a year. Nobody is going trough those log files and they are only needed when there is a specific issue. If that is the case, log files can be enabled and used to resolve the issue.

hellbringer avatar Jul 13 '23 14:07 hellbringer

see also: #8419 If there is a way to disable all logs it doesn't need cleanup

hellbringer avatar Jul 13 '23 14:07 hellbringer

Still no option to disable logging

de-served avatar Apr 05 '25 12:04 de-served

I'm not sure we should provide ability to disable logging, this is crucial for us to troubleshoot. But we should clean logs that we don't need

vanzue avatar May 21 '25 09:05 vanzue

I'll first dedup this, feel free to reopen if you do believe disable logging is must have

vanzue avatar May 21 '25 09:05 vanzue

How is this a duplicate? Debug logging should only be enabled when needed. Creating GB's of logs just because it might be necessary some day to troubleshoot a specific issue is a waste of resources and it would be a lot simpler to implement than a specific cleanup script that deletes the oldest logfile. Especially since every tool seem to use a different log system/directory/directory's/files/extentions. ie: PowerToys\AdvancedPaste\Logs<version>*.txt PowerToys\AlwaysOnTop\Logs<version>*.log PowerToys\Awake\Logs*.txt AND PowerToys\Awake\Logs<version>*.log PowerToys\CmdNotFound\ModuleInterface\Logs<version>*.log PowerToys\CropAndLock\Logs<version>*.log AND PowerToys\CropAndLock\ModuleInterface\Logs<version>*.log etc. Why not make an option: don't log anything and log all the things you can even make it the default and add a extra warning "If you disable logging there is nobody to help you"

hellbringer avatar May 21 '25 13:05 hellbringer

WHEN disabling of logging for EVERY tool (most of them are disabled!) will be available? Enable only when it is needed to user/support! By default it must be OFF!

de-served avatar Sep 01 '25 04:09 de-served