aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-06-06 07:33:54 +0200
committerHarald Welte <laforge@gnumonks.org>2014-08-25 10:09:42 +0200
commitfb84f325b8e672ba7ca1a961f4ef01f4d011e33d (patch)
tree10801c74802d2f5715bea063fb4b362264e395ad /include/osmocom
parent276ca4b1722df573f9af7735820712bcaf32b800 (diff)
logging: Add ability to save/print current log filters
This enables the persistent configuration of let's say 'log filter imsi 012345678' for a given log file in the config file.
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/core/logging.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index 3c5e7b1..4c893ac 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -95,6 +95,17 @@ struct log_target;
typedef int log_filter(const struct log_context *ctx,
struct log_target *target);
+struct log_info;
+struct vty;
+
+typedef void log_print_filters(struct vty *vty,
+ const struct log_info *info,
+ const struct log_target *tgt);
+
+typedef void log_save_filters(struct vty *vty,
+ const struct log_info *info,
+ const struct log_target *tgt);
+
/*! \brief Logging configuration, passed to \ref log_init */
struct log_info {
/* \brief filter callback function */
@@ -106,6 +117,11 @@ struct log_info {
unsigned int num_cat;
/*! \brief total number of user categories (not library) */
unsigned int num_cat_user;
+
+ /* \brief filter saving function */
+ log_save_filters *save_fn;
+ /* \brief filter saving function */
+ log_print_filters *print_fn;
};
/*! \brief Type of logging target */