This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/5252
logging vty: describe 'logging set-log-mask' command, add OSMO_STRINGIFY_VAL()
Change-Id: I73ac5873ede858da44e1486d8a5c81da1ed5b19f
---
M include/osmocom/core/utils.h
M src/vty/logging_vty.c
2 files changed, 13 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/52/5252/1
diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h
index 0a3805d..5c660cd 100644
--- a/include/osmocom/core/utils.h
+++ b/include/osmocom/core/utils.h
@@ -19,6 +19,8 @@
* Note: if nested within another preprocessor macro, this will
* stringify the value of x instead of its name. */
#define OSMO_STRINGIFY(x) #x
+/*! Stringify the value of a macro x, e.g. a port number. */
+#define OSMO_STRINGIFY_VAL(x) OSMO_STRINGIFY(x)
/*! Make a value_string entry from an enum value name */
#define OSMO_VALUE_STRING(x) { x, #x }
/*! Number of bytes necessary to store given BITS */
diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c
index 215394f..c39017b 100644
--- a/src/vty/logging_vty.c
+++ b/src/vty/logging_vty.c
@@ -247,7 +247,15 @@
"logging set-log-mask MASK",
LOGGING_STR
"Set the logmask of this logging target\n"
- "The logmask to use\n")
+ "List of logging categories to log, e.g. 'abc:mno:xyz'. Available log categories depend on the specific"
+ " application, refer to the 'logging level' command. Optionally add individual log levels like"
+ " 'abc,1:mno,3:xyz,5', where the level numbers are"
+ " " OSMO_STRINGIFY(LOGL_DEBUG) "=" OSMO_STRINGIFY_VAL(LOGL_DEBUG)
+ " " OSMO_STRINGIFY(LOGL_INFO) "=" OSMO_STRINGIFY_VAL(LOGL_INFO)
+ " " OSMO_STRINGIFY(LOGL_NOTICE) "=" OSMO_STRINGIFY_VAL(LOGL_NOTICE)
+ " " OSMO_STRINGIFY(LOGL_ERROR) "=" OSMO_STRINGIFY_VAL(LOGL_ERROR)
+ " " OSMO_STRINGIFY(LOGL_FATAL) "=" OSMO_STRINGIFY_VAL(LOGL_FATAL)
+ "\n")
{
struct log_target *tgt = osmo_log_vty2tgt(vty);
@@ -263,7 +271,8 @@
"logging set log mask MASK",
LOGGING_STR
"Decide which categories to output.\n"
- "Log commands\n" "Mask commands\n" "The logmask to use\n");
+ "Log commands\n" "Mask commands\n"
+ "'set log mask' is deprecated, please refer to the docs of 'set-log-mask' instead\n");
DEFUN(diable_logging,
--
To view, visit https://gerrit.osmocom.org/5252
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I73ac5873ede858da44e1486d8a5c81da1ed5b19f
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>