From e443ad9c29ab9ed23a965d129f3b0a2d0e8712d4 Mon Sep 17 00:00:00 2001 From: Yossi Gottlieb Date: Thu, 31 Mar 2016 21:18:45 +0300 Subject: [PATCH] Log loadmodule dlopen() errors. --- src/module.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/module.c b/src/module.c index 7ea02324..dacb7ff8 100644 --- a/src/module.c +++ b/src/module.c @@ -1273,7 +1273,10 @@ int moduleLoad(const char *path) { RedisModuleCtx ctx = REDISMODULE_CTX_INIT; handle = dlopen(path,RTLD_NOW|RTLD_LOCAL); - if (handle == NULL) return C_ERR; + if (handle == NULL) { + serverLog(LL_WARNING, "Module %s failed to load: %s", path, dlerror()); + return C_ERR; + } onload = (int (*)(void *))(unsigned long) dlsym(handle,"RedisModule_OnLoad"); if (onload == NULL) { serverLog(LL_WARNING,