richardphibel / rpms / libdnf

Forked from rpms/libdnf 2 years ago
Clone

Blame SOURCES/0002-Add-log-file-level-main-config-option-RhBug-1802074.patch

288843
From 69e7baa4f6484c39ce25869d0c6252393b7c0411 Mon Sep 17 00:00:00 2001
288843
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
288843
Date: Thu, 4 Jun 2020 11:13:48 +0200
288843
Subject: [PATCH] Add log file level main config option (RhBug:1802074)
288843
288843
https://bugzilla.redhat.com/show_bug.cgi?id=1802074
288843
---
288843
 libdnf/conf/ConfigMain.cpp | 3 +++
288843
 libdnf/conf/ConfigMain.hpp | 1 +
288843
 4 files changed, 6 insertions(+), 2 deletions(-)
288843
288843
diff --git a/libdnf/conf/ConfigMain.cpp b/libdnf/conf/ConfigMain.cpp
288843
index 305b8e233..06352b7f3 100644
288843
--- a/libdnf/conf/ConfigMain.cpp
288843
+++ b/libdnf/conf/ConfigMain.cpp
288843
@@ -169,6 +169,7 @@ class ConfigMain::Impl {
288843
 
288843
     OptionNumber<std::int32_t> debuglevel{2, 0, 10};
288843
     OptionNumber<std::int32_t> errorlevel{3, 0, 10};
288843
+    OptionNumber<std::int32_t> logfilelevel{9, 0, 10};
288843
     OptionPath installroot{"/", false, true};
288843
     OptionPath config_file_path{CONF_FILENAME};
288843
     OptionBool plugins{true};
288843
@@ -350,6 +351,7 @@ ConfigMain::Impl::Impl(Config & owner)
288843
 {
288843
     owner.optBinds().add("debuglevel", debuglevel);
288843
     owner.optBinds().add("errorlevel", errorlevel);
288843
+    owner.optBinds().add("logfilelevel", logfilelevel);
288843
     owner.optBinds().add("installroot", installroot);
288843
     owner.optBinds().add("config_file_path", config_file_path);
288843
     owner.optBinds().add("plugins", plugins);
288843
@@ -491,6 +493,7 @@ ConfigMain::~ConfigMain() = default;
288843
 
288843
 OptionNumber<std::int32_t> & ConfigMain::debuglevel() { return pImpl->debuglevel; }
288843
 OptionNumber<std::int32_t> & ConfigMain::errorlevel() { return pImpl->errorlevel; }
288843
+OptionNumber<std::int32_t> & ConfigMain::logfilelevel() { return pImpl->logfilelevel; }
288843
 OptionString & ConfigMain::installroot() { return pImpl->installroot; }
288843
 OptionString & ConfigMain::config_file_path() { return pImpl->config_file_path; }
288843
 OptionBool & ConfigMain::plugins() { return pImpl->plugins; }
288843
diff --git a/libdnf/conf/ConfigMain.hpp b/libdnf/conf/ConfigMain.hpp
288843
index 118ecbf1c..706471029 100644
288843
--- a/libdnf/conf/ConfigMain.hpp
288843
+++ b/libdnf/conf/ConfigMain.hpp
288843
@@ -49,6 +49,7 @@ class ConfigMain : public Config {
288843
 
288843
     OptionNumber<std::int32_t> & debuglevel();
288843
     OptionNumber<std::int32_t> & errorlevel();
288843
+    OptionNumber<std::int32_t> & logfilelevel();
288843
     OptionString & installroot();
288843
     OptionString & config_file_path();
288843
     OptionBool & plugins();