Bug 2363899

Summary: dnf5 logging is far too verbose due to DEBUG lines
Product: [Fedora] Fedora Reporter: M. Schlegel <moschlegbz>
Component: dnf5Assignee: rpm-software-management
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: amatej, jonathan, kalaklanar, nsella, pkratoch, ppisar, redhat-bugzilla, redhat, rpm-software-management
Target Milestone: ---Keywords: Triaged
Target Release: ---Flags: fedora-admin-xmlrpc: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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

Comment 3 Fedora Release Engineering 2026-05-06 12:49:57 UTC
This message is a reminder that Fedora Linux 42 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 42 on 2026-05-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '42'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 42 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 4 Jackie Meese 2026-05-07 03:19:47 UTC
This is still happening on fedora 43:
grep DEBUG dnf5.log|wc -l
41018

The upstream bug has no progress so far.

Comment 5 M. Schlegel 2026-06-12 15:47:10 UTC
To see what keys there actually are in one of my files (Fully updated Fedora 44 with dnf5 version 5.4.2.1) and how many each has in a typical file on my system I did:

sort -k 3 /var/log/dnf5.log.4 | awk '{print $3}' | uniq

DEBUG
ERROR
INFO
TRACE

So there were 4 different level keys even down to TRACE in my dnf5.logs

Then I counted each:

for k in TRACE DEBUG INFO ERROR; do echo -n "Key: $k -- lines: ";grep $k /var/log/dnf5.log.4 | wc -l ; done

Key: TRACE -- lines: 59
Key: DEBUG -- lines: 70467
Key: INFO -- lines: 2526
Key: ERROR -- lines: 1

So "TRACE" is not really a problem line wise but there's far too many DEBUGs