summaryrefslogtreecommitdiffstats
path: root/src/main.hs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2020-05-01 09:43:07 +0200
committertv <tv@krebsco.de>2020-05-01 09:43:07 +0200
commit59346062401f7ce7ade53d1f45128cb0a76341b4 (patch)
treee1cd2cd8164a9b41daeffbf0fb6d4d32fbdd9995 /src/main.hs
parentf711b91f176ba22820d58a204832121c7fbf232f (diff)
Main.app: runDaemon uses logger
Diffstat (limited to 'src/main.hs')
-rw-r--r--src/main.hs17
1 files changed, 6 insertions, 11 deletions
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