diff options
author | Joey Hess <joey@kitenet.net> | 2013-03-27 12:37:15 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-03-27 12:37:15 -0400 |
commit | 3b1d7915569b0dbfa6cefc54e0537d19290e08bf (patch) | |
tree | 3df923df68eb67d56631e27ff37bbdf752479db3 | |
parent | dbffb68c027965b123e8744612dfe6259aaffb26 (diff) |
add a debug message about where logging goes
-rw-r--r-- | Assistant.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Assistant.hs b/Assistant.hs index 630f3685b..8ea6692e3 100644 --- a/Assistant.hs +++ b/Assistant.hs @@ -159,6 +159,8 @@ import Utility.LogFile import Utility.ThreadScheduler import qualified Build.SysConfig as SysConfig +import System.Log.Logger + stopDaemon :: Annex () stopDaemon = liftIO . Utility.Daemon.stopDaemon =<< fromRepo gitAnnexPidFile @@ -170,9 +172,11 @@ stopDaemon = liftIO . Utility.Daemon.stopDaemon =<< fromRepo gitAnnexPidFile startDaemon :: Bool -> Bool -> Maybe (Maybe Handle -> Maybe Handle -> String -> FilePath -> IO ()) -> Annex () startDaemon assistant foreground startbrowser = do pidfile <- fromRepo gitAnnexPidFile - logfd <- liftIO . openLog =<< fromRepo gitAnnexLogFile + logfile <- fromRepo gitAnnexLogFile + logfd <- liftIO $ openLog logfile if foreground then do + liftIO $ debugM desc $ "logging to " ++ logfile liftIO $ Utility.Daemon.lockPidFile pidfile origout <- liftIO $ catchMaybeIO $ fdToHandle =<< dup stdOutput @@ -194,6 +198,8 @@ startDaemon assistant foreground startbrowser = do checkCanWatch when assistant $ checkEnvironment dstatus <- startDaemonStatus + logfile <- fromRepo gitAnnexLogFile + liftIO $ debugM desc $ "logging to " ++ logfile liftIO $ daemonize $ flip runAssistant (go webappwaiter) =<< newAssistantData st dstatus |