LOGGING: configure logging from the vty
We can now configure logging to (multiple) files, stderr and syslog
from the vty command line in a persistent way (config file)
diff --git a/include/osmocore/logging.h b/include/osmocore/logging.h
index d4d632d..a2c63e9 100644
--- a/include/osmocore/logging.h
+++ b/include/osmocore/logging.h
@@ -69,6 +69,13 @@
unsigned int num_cat;
};
+enum log_target_type {
+ LOG_TGT_TYPE_VTY,
+ LOG_TGT_TYPE_SYSLOG,
+ LOG_TGT_TYPE_FILE,
+ LOG_TGT_TYPE_STDERR,
+};
+
struct log_target {
struct llist_head entry;
@@ -80,6 +87,8 @@
int use_color:1;
int print_timestamp:1;
+ enum log_target_type type;
+
union {
struct {
FILE *out;
@@ -88,6 +97,7 @@
struct {
int priority;
+ int facility;
} tgt_syslog;
struct {
@@ -138,4 +148,7 @@
const char *log_vty_category_string(struct log_info *info);
const char *log_vty_level_string(struct log_info *info);
+struct log_target *log_target_find(int type, const char *fname);
+extern struct llist_head osmo_log_target_list;
+
#endif /* _OSMOCORE_LOGGING_H */