richardphibel / rpms / libdnf

Forked from rpms/libdnf 2 years ago
Clone

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

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