From 1bda1faf65c2ccf4e6a0dc349ddbc0f97b67b1da Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Apr 2017 12:54:50 -0400 Subject: log remote logs to subdir --- Role/Developer.hs | 2 +- Role/User.hs | 3 ++- Role/Watcher.hs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'Role') diff --git a/Role/Developer.hs b/Role/Developer.hs index d210e50..36cc600 100644 --- a/Role/Developer.hs +++ b/Role/Developer.hs @@ -51,7 +51,7 @@ run' runner url = do void $ runClientApp app developer :: TMVar (TVar DeveloperState) -> TMChan (Message Entered) -> TMChan AnyMessage -> SessionID -> IO () -developer dsv ichan ochan sid = withSessionLogger sid $ \logger -> do +developer dsv ichan ochan sid = withSessionLogger (Just "remote") sid $ \logger -> do sk <- genMySessionKey (controlinput, controloutput) <- openControlWindow displayInControlWindow controlinput diff --git a/Role/User.hs b/Role/User.hs index d11c235..1e842d0 100644 --- a/Role/User.hs +++ b/Role/User.hs @@ -44,7 +44,8 @@ run os = fromMaybe (ExitFailure 101) <$> connect putStrLn "Others can connect to this session and help you debug by running:" putStrLn $ " debug-me " ++ show url hFlush stdout - withSessionLogger sid $ go ochan ichan usv controlinput controloutput + withSessionLogger Nothing sid $ + go ochan ichan usv controlinput controloutput go ochan ichan usv controlinput controloutput logger = do (cmd, cmdparams) <- shellCommand os runWithPty cmd cmdparams $ \(p, ph) -> do diff --git a/Role/Watcher.hs b/Role/Watcher.hs index f314b46..0867da1 100644 --- a/Role/Watcher.hs +++ b/Role/Watcher.hs @@ -15,7 +15,7 @@ run :: WatchOpts -> IO () run = run' watcher . watchUrl watcher :: TMVar (TVar DeveloperState) -> TMChan (Message Entered) -> TMChan AnyMessage -> SessionID -> IO () -watcher dsv _ichan ochan sid = withSessionLogger sid $ \logger -> inRawMode $ do +watcher dsv _ichan ochan sid = withSessionLogger (Just "remote") sid $ \logger -> inRawMode $ do sk <- genMySessionKey (st, startoutput) <- processSessionStart sk ochan logger dsv emitOutput startoutput -- cgit v1.2.3