Bug 2363899 - dnf5 logging is far too verbose due to DEBUG lines
Summary: dnf5 logging is far too verbose due to DEBUG lines
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: 42
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: ---
Assignee: rpm-software-management
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-03 18:22 UTC by M. Schlegel
Modified: 2025-05-05 08:43 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description M. Schlegel 2025-05-03 18:22:06 UTC
Fedora 42 with dnf5 version:
dnf5 version 5.2.13.1
dnf5 plugin API version 2.0
libdnf5 version 5.2.13.1
libdnf5 plugin API version 2.2

shows excessively high verbosity by default. This should be reduced or at least a control option added to reduce the verbosity to exclude "DEBUG" lines.  In the current files on my system I've increased the default dnf5 log file from 1MB to 10MB with the "log_size" user option to get more history. So with a full 10MB file I have his mixture of DEBUG vs non-DEBUG lines in a file:

# grep DEBUG dnf5.log.4 | wc -l
70304

# grep -v DEBUG dnf5.log.4 | wc -l
2269

68000 some lines of DEBUG is a waste of space in the file when a bug is not being researched to justify that logging

Reproducible: Always

Steps to Reproduce:
1. Look in /var/log/dnf5*log files
2. The files are far too filled up with non-useful DEBUG output
3.
Actual Results:
Use dnf5 as normal, find the log files only retain a week or two of logging due to overly high verbosity level (DEBUG is enabled by default) making rotation result in too short logging date range

Expected Results:
dnf5 log files should contain information usually useful for system maintenance and not low level details about dnf5

Additional Information:
Default to maybe INFO level instead of DEBUG.  dnf5 should have a debuglevel option setting like dnf4 used to.

Comment 1 M. Schlegel 2025-05-03 18:34:28 UTC
# grep 'DEBUG \[librepo\]' dnf5.log.4 |wc -l
59827

# grep DEBUG dnf5.log.4  | wc -l
70304


Most of the lines seem to be related to librepo DEBUG logging

Comment 2 Pavla Kratochvilova 2025-05-05 08:43:27 UTC
This is valid. Corresponding upstream issue: https://github.com/rpm-software-management/dnf5/issues/1819


Note You need to log in before you can comment on or make changes to this bug.