Redirect to log files earlier to prevent some debug spam on console

git-svn-id: https://svn.musicpd.org/mpd/trunk@4406 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
J. Alexander Treuman 2006-07-19 18:22:06 +00:00
parent 0905630073
commit adcc266250

View File

@ -543,18 +543,22 @@ int main(int argc, char *argv[])
changeToUser(); changeToUser();
openLogFiles(&options, &out, &err); openLogFiles(&options, &out, &err);
/* Redirect only stdout, so fatal errors are spit out to console */
setupLogOutput(&options, out, stderr);
initPlayerData(); initPlayerData();
daemonize(&options); daemonize(&options);
/* Now that we're daemonized, redirect errors to the error log */
setupLogOutput(&options, out, err);
initInputPlugins(); initInputPlugins();
initPaths(); initPaths();
initAudioConfig(); initAudioConfig();
initAudioDriver(); initAudioDriver();
initSigHandlers(); initSigHandlers();
setupLogOutput(&options, out, err);
startMainProcess(); startMainProcess();
/* This is the main process which has /* This is the main process which has
* been forked from the master process. * been forked from the master process.