From 59346062401f7ce7ade53d1f45128cb0a76341b4 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 1 May 2020 09:43:07 +0200 Subject: Main.app: runDaemon uses logger --- src/main.hs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/main.hs b/src/main.hs index f1016f2..042c8da 100644 --- a/src/main.hs +++ b/src/main.hs @@ -106,17 +106,12 @@ app client = do let runDaemon = - P.run "flameshot" [] Nothing Nothing "" Nothing P.Callbacks - { P.onOutLine = \_ s -> putLog $ "daemon stdout: " <> Plain s - , P.onErrLine = \_ s -> putLog $ "daemon stderr: " <> red (Plain s) - , P.onError = \_ _err -> do - daemonStop - - , P.onExit = \_ _status -> do - daemonStop - - , P.onStart = \_ -> return () - } + P.run "flameshot" [] Nothing Nothing "" Nothing $ + logger putLog "daemon" <> + mempty + { P.onError = \_ _ -> daemonStop + , P.onExit = \_ _ -> daemonStop + } runLogPrinter = forever $ takeLog >>= T.hPutStrLn stderr . pp -- cgit v1.2.3