aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2006-07-19 18:22:06 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2006-07-19 18:22:06 +0000
commitadcc26625054fed1cc05a983e1932f29c97b7152 (patch)
treea8d8172ba60132f0b35e1465003b46f459e9cd10 /src
parent0905630073dc2cc56e5202f7904bfd757edd05aa (diff)
downloadmpd-adcc26625054fed1cc05a983e1932f29c97b7152.tar.gz
mpd-adcc26625054fed1cc05a983e1932f29c97b7152.tar.xz
mpd-adcc26625054fed1cc05a983e1932f29c97b7152.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 20bb86558..49b785fa8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -543,18 +543,22 @@ int main(int argc, char *argv[])
changeToUser();
openLogFiles(&options, &out, &err);
+ /* Redirect only stdout, so fatal errors are spit out to console */
+ setupLogOutput(&options, out, stderr);
initPlayerData();
daemonize(&options);
+ /* Now that we're daemonized, redirect errors to the error log */
+ setupLogOutput(&options, out, err);
+
initInputPlugins();
initPaths();
initAudioConfig();
initAudioDriver();
initSigHandlers();
- setupLogOutput(&options, out, err);
startMainProcess();
/* This is the main process which has
* been forked from the master process.