aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-12-05 09:35:30 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-12-05 10:23:28 +0100
commit2d6ad13d8daf860595e6d4025861e122ce574871 (patch)
tree2d9290977a62188851b60f19948a639eeecc5765 /include
parenta5dc19dc4053e45a4a9ae8facfbdb7393ad5fe69 (diff)
logging: Make it possible to print category/subsys and timestamps
We want to see from which category/subsystem a certain log message is coming from and use a different timestamp format as well. Add two new bitfields. This doesn't change the size of the structure and on 32bit we still have 27bits left. The extended timestamp will take preference over the current and default timestamp format. Fixes: SYS#602
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/core/logging.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index c37c9f3..ba41762 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -154,6 +154,10 @@ struct log_target {
unsigned int print_timestamp:1;
/*! \brief should log messages be prefixed with a filename? */
unsigned int print_filename:1;
+ /*! \brief should log messages be prefixed with a category name? */
+ unsigned int print_category:1;
+ /*! \brief should log messages be prefixed with an extended timestamp? */
+ unsigned int print_ext_timestamp:1;
/*! \brief the type of this log taget */
enum log_target_type type;
@@ -202,8 +206,10 @@ int log_set_context(uint8_t ctx, void *value);
void log_set_all_filter(struct log_target *target, int);
void log_set_use_color(struct log_target *target, int);
+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_log_level(struct log_target *target, int log_level);
void log_parse_category_mask(struct log_target *target, const char* mask);
int log_parse_level(const char *lvl);