aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-05-16 11:04:26 +0100
committerRichard van der Hoff <richard@matrix.org>2016-05-16 11:04:26 +0100
commit48cb5f925d3bf21c51818dbe46c864a6975ccc75 (patch)
treef70373784795f7206107147c9aba9b1dfc1d4f25 /src
parent11dbf2aab3e9a65148a40ac6b5b1124929344c1a (diff)
Add olm::log_enabled_for
Diffstat (limited to 'src')
-rw-r--r--src/logging.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/logging.cpp b/src/logging.cpp
index 66b9fa8..4819e1c 100644
--- a/src/logging.cpp
+++ b/src/logging.cpp
@@ -26,6 +26,11 @@ void set_log_level(unsigned int level) {
log_level = level;
}
+bool log_enabled_for(unsigned int level, const char *category)
+{
+ return level <= log_level;
+}
+
void logf(unsigned int level, const char *category,
const char *format, ...) {
if (level > log_level) {