diff --git a/src/module.c b/src/module.c index cf2305b5..f24c0af2 100644 --- a/src/module.c +++ b/src/module.c @@ -5073,10 +5073,10 @@ void moduleLogRaw(RedisModule *module, const char *levelstr, const char *fmt, va * printf-alike specifiers, while level is a string describing the log * level to use when emitting the log, and must be one of the following: * - * * "debug" - * * "verbose" - * * "notice" - * * "warning" + * * "debug" (`REDISMODULE_LOGLEVEL_DEBUG`) + * * "verbose" (`REDISMODULE_LOGLEVEL_VERBOSE`) + * * "notice" (`REDISMODULE_LOGLEVEL_NOTICE`) + * * "warning" (`REDISMODULE_LOGLEVEL_WARNING`) * * If the specified log level is invalid, verbose is used by default. * There is a fixed limit to the length of the log line this function is able diff --git a/src/redismodule.h b/src/redismodule.h index e7001ee7..fba810de 100644 --- a/src/redismodule.h +++ b/src/redismodule.h @@ -193,6 +193,12 @@ This flag should not be used directly by the module. #define REDISMODULE_NOT_USED(V) ((void) V) +/* Logging level strings */ +#define REDISMODULE_LOGLEVEL_DEBUG "debug" +#define REDISMODULE_LOGLEVEL_VERBOSE "verbose" +#define REDISMODULE_LOGLEVEL_NOTICE "notice" +#define REDISMODULE_LOGLEVEL_WARNING "warning" + /* Bit flags for aux_save_triggers and the aux_load and aux_save callbacks */ #define REDISMODULE_AUX_BEFORE_RDB (1<<0) #define REDISMODULE_AUX_AFTER_RDB (1<<1)