path: root/rpc/glfs-operations.c
diff options
authorPrasanna Kumar Kalever <>2017-08-17 11:21:11 +0530
committerPrasanna Kumar Kalever <>2017-08-17 14:22:55 +0530
commitb535c44fdd2b71c50a8fcbcf1e1e1c2d1c0340e9 (patch)
tree208d639723c7a8bfc1b928ee7843155c69fe8a5e /rpc/glfs-operations.c
parentd723907c8eaa25f107c7fadd79ca5f9bc6596edf (diff)
logger: support logdir choosing via Environment variable
Currently the default logdir is DATADIR /log/gluster-block/ This patch will provide a way to change this default logdir via Env variable $ export GB_LOGDIR=/var/log/gluster-block-new-path/ Note: make sure to restart the processes (cli & daemon) after you set GB_LOGDIR Change-Id: Id142e4a4dfe7b6ebc9cf8296b8ceb8bff37691b8 Signed-off-by: Prasanna Kumar Kalever <>
Diffstat (limited to 'rpc/glfs-operations.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/glfs-operations.c b/rpc/glfs-operations.c
index 0509f7f..d5d3aba 100644
--- a/rpc/glfs-operations.c
+++ b/rpc/glfs-operations.c
@@ -45,13 +45,13 @@ glusterBlockVolumeInit(char *volume, int *errCode, char **errMsg)
goto out;
- ret = glfs_set_logging(glfs, GFAPI_LOG_FILE, GFAPI_LOG_LEVEL);
+ ret = glfs_set_logging(glfs, gbConf.gfapiLogFile, GFAPI_LOG_LEVEL);
if (ret) {
*errCode = errno;
GB_ASPRINTF (errMsg, "Not able to add logging for volume %s[%s]", volume,
LOG("gfapi", GB_LOG_ERROR, "glfs_set_logging(%s, %d) on %s failed[%s]",
- GFAPI_LOG_FILE, GFAPI_LOG_LEVEL, volume, strerror(*errCode));
+ gbConf.gfapiLogFile, GFAPI_LOG_LEVEL, volume, strerror(*errCode));
goto out;