Skip to content

Commit

Permalink
Change librpm log mask value from 0xFF to everything up to RPMLOG_INFO
Browse files Browse the repository at this point in the history
RPMLOG_DEBUG is fairly low-level and causes librpm to not remove
auxiliary temporary files. Therefore, it is not a good idea to use
RPMLOG_DEBUG as the default. Everything except RPMLOG_DEBUG is now logged.

However, we should consider introducing an option to enable RPMLOG_DEBUG
for debugging purposes.
  • Loading branch information
jrohel committed Oct 2, 2023
1 parent bf73442 commit a9ddc13
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libdnf5/rpm/rpm_log_guard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ RpmLogGuard::RpmLogGuard(const BaseWeakPtr & base) : RpmLogGuardBase() {
rpmlogSetCallback(&rpmlog_callback, &*base->get_logger());

// TODO(lukash) once Logger supports log mask, propagate to rpm
old_log_mask = rpmlogSetMask(0xff);
// logs everything up to RPMLOG_INFO -> everything except RPMLOG_DEBUG, which is fairly low-level
// and causes librpm to not remove auxiliary temporary files.
old_log_mask = rpmlogSetMask(RPMLOG_UPTO(RPMLOG_PRI(RPMLOG_INFO)));
}


Expand Down

0 comments on commit a9ddc13

Please sign in to comment.