From 40c6c18e57d88b101bd4396d48aefa681689bfb3 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 2 Aug 2023 17:50:02 -0400 Subject: Better log message --- Biz/Bild.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Biz/Bild.hs b/Biz/Bild.hs index f0b829d..d20c46e 100644 --- a/Biz/Bild.hs +++ b/Biz/Bild.hs @@ -676,7 +676,7 @@ build andTest loud analysis = Ghc -> case out of Meta.None -> pure (Exit.ExitSuccess, mempty) Meta.Bin _ -> do - Log.info ["bild", "nixBuild", "ghc", nschunk namespace] + Log.info ["bild", "nix", toLog builder, nschunk namespace] result <- nixBuild loud target if andTest && (isSuccess <| fst result) then test loud target @@ -697,9 +697,6 @@ build andTest loud analysis = NixBuild -> do Log.info ["bild", "nix", toLog builder, nschunk namespace] proc loud namespace (toNixFlag compiler) compilerFlags - where - toLog (Local u) = u - toLog (Remote u h) = u <> "@" <> h Copy -> do Log.warn ["bild", "copy", "not implemented yet", nschunk namespace] pure (Exit.ExitSuccess, mempty) @@ -710,6 +707,11 @@ build andTest loud analysis = Log.info ["bild", "dev", "lisp", nschunk namespace] proc loud namespace (toNixFlag compiler) compilerFlags +-- | Format for logging +toLog :: Builder -> Text +toLog (Local u) = u +toLog (Remote u h) = u <> "@" <> h + data Proc = Proc { loud :: Bool, cmd :: String, -- cgit v1.2.3