Bug 430355 - Provide an option to disable logging
Summary: Provide an option to disable logging
Status: CONFIRMED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-13 22:35 UTC by Lastique
Modified: 2023-11-14 17:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lastique 2020-12-13 22:35:49 UTC
SUMMARY

Please, provide an option to disable logging in ~/.local/share/ktorrent. During the normal operation, logs are not necessary, and simply waste space and issue unnecessary writes to the disk, which can be harmful for SSDs.

The logging is fairly intensive as well. For example, on my system with ~150 seeding torrents I can see a few dozens (30-60) log records per second. I'm assuming, logging intensity depends on the network activity and can easily go even higher.

SOFTWARE/OS VERSIONS

Operating System: Kubuntu 20.10
Ktorrent: 5.2.0
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2
Kernel Version: 5.8.0-33-lowlatency
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-2600K CPU @ 3.40GHz
Memory: 15.6 GiB of RAM
Graphics Processor: GeForce RTX 2080 Ti/PCIe/SSE2
Comment 1 Lastique 2023-11-11 01:16:04 UTC
Related proposed change that adds a command line option to disable logging:

https://invent.kde.org/network/ktorrent/-/merge_requests/86
Comment 2 Jack Hill 2023-11-14 17:29:50 UTC
Seems like the bug janitor but didn't work so I will post the details here:

Git commit 1d15b7d578da30864e9de70523ba6854f525955f by Andrey Semashev.
Committed on 11/11/2023 at 01:13.
Pushed by stikonas into branch 'master'.

Disable logging by default and add --enable-logging command line option.

Logging is not useful during normal operation of the program and only
generates unnecessary writes to the filesystem and periodic CPU load
when the log files are compressed. So disable logging by default.

Provide the --enable-logging command line option to enable logging
back. The option is now also required to enable logging on console
(which is further enabled by --verbose).

Related: bug 430355

M  +7    -3    ktorrent/main.cpp

https://invent.kde.org/network/ktorrent/-/commit/1d15b7d578da30864e9de70523ba6854f525955f