summaryrefslogtreecommitdiff
path: root/Assistant.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-07-16 15:10:41 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-07-16 15:10:41 -0400
commitf1e2d1733e2441e702303ae22f8f926834d5c410 (patch)
tree90afc2133359dcf6aaa2ec5723a4e3a7632c8f45 /Assistant.hs
parentbe34ba41b40a26ac7aa5caacb63cf9cb11600a74 (diff)
always debug where logging to on startup
Diffstat (limited to 'Assistant.hs')
-rw-r--r--Assistant.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/Assistant.hs b/Assistant.hs
index c1f480f9d..63fdc6251 100644
--- a/Assistant.hs
+++ b/Assistant.hs
@@ -76,6 +76,7 @@ startDaemon assistant foreground startdelay cannotrun listenhost startbrowser =
Annex.changeState $ \s -> s { Annex.daemon = True }
pidfile <- fromRepo gitAnnexPidFile
logfile <- fromRepo gitAnnexLogFile
+ debugM desc $ "logging to " ++ logfile
#ifndef mingw32_HOST_OS
createAnnexDirectory (parentDir logfile)
logfd <- liftIO $ handleToFd =<< openLog logfile
@@ -85,9 +86,7 @@ startDaemon assistant foreground startdelay cannotrun listenhost startbrowser =
fdToHandle =<< dup stdOutput
origerr <- liftIO $ catchMaybeIO $
fdToHandle =<< dup stdError
- let undaemonize a = do
- debugM desc $ "logging to " ++ logfile
- Utility.Daemon.foreground logfd (Just pidfile) a
+ let undaemonize = Utility.Daemon.foreground logfd (Just pidfile)
start undaemonize $
case startbrowser of
Nothing -> Nothing
@@ -102,8 +101,6 @@ startDaemon assistant foreground startdelay cannotrun listenhost startbrowser =
createAnnexDirectory (parentDir logfile)
ifM (liftIO $ isNothing <$> getEnv flag)
( liftIO $ withFile devNull WriteMode $ \nullh -> do
- when (not foreground) $
- debugM desc $ "logging to " ++ logfile
loghandle <- openLog logfile
e <- getEnvironment
cmd <- readProgramFile