From b2613fa269cadea8ad1f563236fdfddae531083e Mon Sep 17 00:00:00 2001
From: patrick96
Date: Sun, 1 Mar 2020 21:26:20 +0100
Subject: [PATCH] logger: Use notices for config file and fonts
It is useful for people to see what config file polybar loaded.
For debugging font issues people almost always need to check what fonts
polybar loaded, for that they need to run polybar with info logging. Now
this information is always provided. This requires an update in the font
wiki page.
---
src/components/config_parser.cpp | 2 +-
src/components/renderer.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/config_parser.cpp b/src/components/config_parser.cpp
index afb6c7f5..3adf6e00 100644
--- a/src/components/config_parser.cpp
+++ b/src/components/config_parser.cpp
@@ -9,7 +9,7 @@ config_parser::config_parser(const logger& logger, string&& file, string&& bar)
: m_log(logger), m_config(file_util::expand(file)), m_barname(move(bar)) {}
config::make_type config_parser::parse() {
- m_log.info("Parsing config file: %s", m_config);
+ m_log.notice("Parsing config file: %s", m_config);
parse_file(m_config, {});
diff --git a/src/components/renderer.cpp b/src/components/renderer.cpp
index a7f85c2c..b0aa392e 100644
--- a/src/components/renderer.cpp
+++ b/src/components/renderer.cpp
@@ -159,7 +159,7 @@ renderer::renderer(connection& conn, signal_emitter& sig, const config& conf, co
pattern.erase(pos);
}
auto font = cairo::make_font(*m_context, string{pattern}, offset, dpi_x, dpi_y);
- m_log.info("Loaded font \"%s\" (name=%s, offset=%i, file=%s)", pattern, font->name(), offset, font->file());
+ m_log.notice("Loaded font \"%s\" (name=%s, offset=%i, file=%s)", pattern, font->name(), offset, font->file());
*m_context << move(font);
}
}