MXS-2075: Only enable stdout redirection for maxscale

The stdout redirection must not be enabled for the other programs as they
are not run as daemon processes.
This commit is contained in:
Markus Mäkelä
2018-10-01 11:01:09 +03:00
parent 048aee1fb7
commit 288fbc8c33
3 changed files with 19 additions and 4 deletions

View File

@ -1985,6 +1985,11 @@ int main(int argc, char **argv)
log_target = MXS_LOG_TARGET_SHMEM;
}
if (!to_stdout && daemon_mode)
{
mxs_log_redirect_stdout(true);
}
succp = mxs_log_init(NULL, get_logdir(), log_target);
if (!succp)