summaryrefslogtreecommitdiffstats
path: root/src/logging.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-02-23 18:03:28 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-02-23 18:08:12 +0100
commit8b86cd76cf6e5254f888276d73f94bb0bfcee03b (patch)
tree9d2c065758f49163a934a1f89b2f74018ec9cfff /src/logging.c
parent492e1808b0adede71be81cf0ad9d112dc39255a5 (diff)
logging.h: fixup: shorter names for LOGGING_FILTER_* and LOGGING_CTX_*
My recent logging patch was merged to master a bit too soon. Accomodate the request for naming that matches the general "LOG" prefix instead of "LOGGING". libosmocore will not be backwards-compatible with the few commits from change-id I5c343630020f4b108099696fd96c2111614c8067 up to this one. This and following commits are backwards compatible with those before that short window. See also: * openbsc change-id Ib2ec5e4884aa90f48051ee2f832af557aa525991 * osmo-pcu change-id I4db4a668f2be07f3d55f848d38d1b490d8a7a685 Change-Id: I424fe3f12ea620338902b2bb8230544bde3f1a93
Diffstat (limited to 'src/logging.c')
-rw-r--r--src/logging.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/logging.c b/src/logging.c
index b09d6845..6a1e9299 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -48,11 +48,11 @@
#include <osmocom/vty/logging.h> /* for LOGGING_STR. */
-osmo_static_assert(_LOGGING_CTX_COUNT <= ARRAY_SIZE(((struct log_context*)NULL)->ctx),
+osmo_static_assert(_LOG_CTX_COUNT <= ARRAY_SIZE(((struct log_context*)NULL)->ctx),
enum_logging_ctx_items_fit_in_struct_log_context);
-osmo_static_assert(_LOGGING_FILTER_COUNT <= ARRAY_SIZE(((struct log_target*)NULL)->filter_data),
+osmo_static_assert(_LOG_FLT_COUNT <= ARRAY_SIZE(((struct log_target*)NULL)->filter_data),
enum_logging_filters_fit_in_log_target_filter_data);
-osmo_static_assert(_LOGGING_FILTER_COUNT <= 8*sizeof(((struct log_target*)NULL)->filter_map),
+osmo_static_assert(_LOG_FLT_COUNT <= 8*sizeof(((struct log_target*)NULL)->filter_map),
enum_logging_filters_fit_in_log_target_filter_map);
struct log_info *osmo_log_info;
@@ -381,7 +381,7 @@ static inline int check_log_to_target(struct log_target *tar, int subsys, int le
/* Apply filters here... if that becomes messy we will
* need to put filters in a list and each filter will
* say stop, continue, output */
- if ((tar->filter_map & (1 << LOGGING_FILTER_ALL)) != 0)
+ if ((tar->filter_map & (1 << LOG_FLT_ALL)) != 0)
return 1;
if (osmo_log_info->filter_fn)
@@ -499,20 +499,20 @@ int log_set_context(uint8_t ctx_nr, void *value)
return 0;
}
-/*! \brief Enable the \ref LOGGING_FILTER_ALL log filter
+/*! \brief Enable the \ref LOG_FLT_ALL log filter
* \param[in] target Log target to be affected
* \param[in] all enable (1) or disable (0) the ALL filter
*
- * When the \ref LOGGING_FILTER_ALL filter is enabled, all log messages will be
+ * When the \ref LOG_FLT_ALL filter is enabled, all log messages will be
* printed. It acts as a wildcard. Setting it to \a 1 means there is no
* filtering.
*/
void log_set_all_filter(struct log_target *target, int all)
{
if (all)
- target->filter_map |= (1 << LOGGING_FILTER_ALL);
+ target->filter_map |= (1 << LOG_FLT_ALL);
else
- target->filter_map &= ~(1 << LOGGING_FILTER_ALL);
+ target->filter_map &= ~(1 << LOG_FLT_ALL);
}
/*! \brief Enable or disable the use of colored output