diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-02-18 20:37:04 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-02-18 20:37:04 +0100 |
commit | 2822296ddb22389c5b4e9b8fb6ef7c906ff99314 (patch) | |
tree | 5a05ad56e7ac5730bb98d12eef4aa527e4c7d0d9 /include/osmocore/logging.h | |
parent | 46cfd77f7521ad53934e1e42057723b4cd52d241 (diff) |
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)
Diffstat (limited to 'include/osmocore/logging.h')
-rw-r--r-- | include/osmocore/logging.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/osmocore/logging.h b/include/osmocore/logging.h index d4d632d8..a2c63e9a 100644 --- a/include/osmocore/logging.h +++ b/include/osmocore/logging.h @@ -69,6 +69,13 @@ struct log_info { 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 @@ struct log_target { int use_color:1; int print_timestamp:1; + enum log_target_type type; + union { struct { FILE *out; @@ -88,6 +97,7 @@ struct log_target { struct { int priority; + int facility; } tgt_syslog; struct { @@ -138,4 +148,7 @@ void log_del_target(struct log_target *target); 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 */ |