summaryrefslogtreecommitdiffstats
path: root/cli/src/cli.c
diff options
context:
space:
mode:
authorBala.FA <barumuga@redhat.com>2013-08-09 16:51:11 +0530
committerVijay Bellur <vbellur@redhat.com>2013-08-13 07:07:43 -0700
commit4e63eafaed6073eab3d87c579e964fa5302f0d63 (patch)
tree1fba739f316a595141d0faee09c823326f0f4802 /cli/src/cli.c
parenta1fe3d040a8c9b032cbcb5e831383628cddfa39a (diff)
log: set ident to openlog
at syslog side, log message is identified by its properties like programname, pid, etc. brick/mount processes need to be identified uniquely as they are different process of gluterfsd/glusterfs. At rsyslog side, log separated by programname/app-name with pid works but bit hard to identify them in long run which process is for what brick/mount. This patch fixes by setting identity string at openlog() which sets programname/app-name as similar to old style log file prefixed by gluster, glusterd, glusterfs or glusterfsd Change-Id: Ia05068943fa67ae1663aaded1444cf84ea648db8 BUG: 928648 Signed-off-by: Bala.FA <barumuga@redhat.com> Reviewed-on: http://review.gluster.org/5541 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'cli/src/cli.c')
-rw-r--r--cli/src/cli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 37015c33..f87038b6 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -168,7 +168,8 @@ logging_init (glusterfs_ctx_t *ctx, struct cli_state *state)
char *log_file = state->log_file ? state->log_file :
DEFAULT_CLI_LOG_FILE_DIRECTORY "/cli.log";
- if (gf_log_init (ctx, log_file) == -1) {
+ /* passing ident as NULL means to use default ident for syslog */
+ if (gf_log_init (ctx, log_file, NULL) == -1) {
fprintf (stderr, "ERROR: failed to open logfile %s\n",
log_file);
return -1;