diff options
| -rw-r--r-- | libglusterfs/src/logging.c | 6 | ||||
| -rw-r--r-- | xlators/features/marker/utils/src/gsyncd.c | 2 | ||||
| -rw-r--r-- | xlators/features/marker/utils/syncdaemon/gsyncd.py | 2 | 
3 files changed, 8 insertions, 2 deletions
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c index 5b9c1fc4f74..5485260bc10 100644 --- a/libglusterfs/src/logging.c +++ b/libglusterfs/src/logging.c @@ -136,6 +136,12 @@ gf_log_init (const char *file)                  return -1;          } +        if (strcmp (file, "-") == 0) { +                gf_log_logfile = stderr; + +                return 0; +        } +          filename = gf_strdup (file);          if (!filename) {                  fprintf (stderr, "ERROR: updating log-filename failed: %s\n", diff --git a/xlators/features/marker/utils/src/gsyncd.c b/xlators/features/marker/utils/src/gsyncd.c index d3fa2d325a6..d554e562b23 100644 --- a/xlators/features/marker/utils/src/gsyncd.c +++ b/xlators/features/marker/utils/src/gsyncd.c @@ -107,7 +107,7 @@ invoke_gsyncd (int argc, char **argv)                  /* in restricted mode we forcibly use the system-wide config */                  runinit (&runner);                  runner_add_args (&runner, SBIN_DIR"/gluster", -                                 "--log-file=/dev/stderr", "system::", "getwd", +                                 "--log-file=-", "system::", "getwd",                                   NULL);                  runner_redir (&runner, STDOUT_FILENO, RUN_PIPE);                  if (runner_start (&runner) == 0 && diff --git a/xlators/features/marker/utils/syncdaemon/gsyncd.py b/xlators/features/marker/utils/syncdaemon/gsyncd.py index 2b8356b1620..f145cbc6d98 100644 --- a/xlators/features/marker/utils/syncdaemon/gsyncd.py +++ b/xlators/features/marker/utils/syncdaemon/gsyncd.py @@ -148,7 +148,7 @@ def main_i():      op.add_option('--gluster-log-file',    metavar='LOGF',  default=os.devnull, type=str, action='callback', callback=store_abs)      op.add_option('--gluster-log-level',   metavar='LVL')      op.add_option('--gluster-params',      metavar='PRMS',  default='') -    op.add_option('--gluster-cli-options', metavar='OPTS',  default='--log-file=/dev/stderr') +    op.add_option('--gluster-cli-options', metavar='OPTS',  default='--log-file=-')      op.add_option('--mountbroker',         metavar='LABEL')      op.add_option('-p', '--pid-file',      metavar='PIDF',  type=str, action='callback', callback=store_abs)      op.add_option('-l', '--log-file',      metavar='LOGF',  type=str, action='callback', callback=store_abs)  | 
