aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/core/logging.h
diff options
context:
space:
mode:
authorKaterina Barone-Adesi <kat.obsc@gmail.com>2013-02-21 05:16:29 +0000
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-02-27 15:13:45 +0100
commit3309a43ef56366926589fdb3f7e4ee8af41fe1c5 (patch)
treebcef95b0f1491394a1a62bd1ce77f27655449259 /include/osmocom/core/logging.h
parentefd2bd691fd948df00c1eebcd8599b871f5c34f5 (diff)
Added a ring buffer log target to store the last N log messages.
The log target can be used via log alarms and show alarms. Why? This feature was proposed/requested at http://openbsc.osmocom.org/trac/wiki/Tasks/ErrorLogTarget All messages use the same amount of space, prioritizing simplicity.
Diffstat (limited to 'include/osmocom/core/logging.h')
-rw-r--r--include/osmocom/core/logging.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index 54262b7f..fa3365ad 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -114,6 +114,7 @@ enum log_target_type {
LOG_TGT_TYPE_SYSLOG, /*!< \brief syslog based logging */
LOG_TGT_TYPE_FILE, /*!< \brief text file logging */
LOG_TGT_TYPE_STDERR, /*!< \brief stderr logging */
+ LOG_TGT_TYPE_STRRB, /*!< \brief osmo_strrb-backed logging */
};
/*! \brief structure representing a logging target */
@@ -154,6 +155,10 @@ struct log_target {
struct {
void *vty;
} tgt_vty;
+
+ struct {
+ void *rb;
+ } tgt_rb;
};
/*! \brief call-back function to be called when the logging framework