aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-01-16 01:49:37 +0100
committerHarald Welte <laforge@gnumonks.org>2018-01-17 11:13:58 +0000
commit886e548ab080896da6760036f38b93ff97fd01a4 (patch)
tree1968249346725279b289381290a387024bb64889 /include
parent3cafc060142e256cf9f9ae4a6362c248c8e1fb95 (diff)
logging: add ability to log the log-level with API and vty
Log the log level string after the category name, if enabled. The default behavior remains unchanged. Change-Id: Ie6be365cfa6aeabdf115bff19bac198440c9adf1
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/core/logging.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index 922cbf6e..1e809d0a 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -298,6 +298,9 @@ struct log_target {
void (*raw_output)(struct log_target *target, int subsys,
unsigned int level, const char *file, int line,
int cont, const char *format, va_list ap);
+
+ /* Should the log level be printed? */
+ bool print_level;
};
/* use the above macros */
@@ -320,6 +323,7 @@ void log_set_print_extended_timestamp(struct log_target *target, int);
void log_set_print_timestamp(struct log_target *target, int);
void log_set_print_filename(struct log_target *target, int);
void log_set_print_category(struct log_target *target, int);
+void log_set_print_level(struct log_target *target, int);
void log_set_log_level(struct log_target *target, int log_level);
void log_parse_category_mask(struct log_target *target, const char* mask);
const char* log_category_name(int subsys);