diff options
author | Katerina Barone-Adesi <kat.obsc@gmail.com> | 2013-02-21 05:16:29 +0000 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-02-27 14:45:48 +0100 |
commit | 73377229bb33ab79682ce4b126a63602d13304ad (patch) | |
tree | bc2ae47cbeec82f6c30470a767a523578c8efdca /include/osmocom/core/logging.h | |
parent | 24e5e05b6f5ee841e4533facb434617a33423e22 (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.h | 5 |
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 |