aboutsummaryrefslogtreecommitdiffstats
path: root/src/VeriFuzz/Sim
diff options
context:
space:
mode:
authorYann Herklotz <git@ymhg.org>2019-05-07 19:20:21 +0100
committerYann Herklotz <git@ymhg.org>2019-05-07 19:20:21 +0100
commitb073c6214dd62c9b8d30c5ec187375828c753d0e (patch)
tree2e9d60356cce48ab52c9aed74da589e5134e45e6 /src/VeriFuzz/Sim
parentd52b98fb2672374c48f157aaa68483c39a46363d (diff)
downloadverismith-b073c6214dd62c9b8d30c5ec187375828c753d0e.tar.gz
verismith-b073c6214dd62c9b8d30c5ec187375828c753d0e.zip
Create better command line output
Diffstat (limited to 'src/VeriFuzz/Sim')
-rw-r--r--src/VeriFuzz/Sim/Internal.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/VeriFuzz/Sim/Internal.hs b/src/VeriFuzz/Sim/Internal.hs
index 06d0264..c26b888 100644
--- a/src/VeriFuzz/Sim/Internal.hs
+++ b/src/VeriFuzz/Sim/Internal.hs
@@ -45,6 +45,7 @@ import qualified Data.ByteString as B
import Data.Maybe (catMaybes)
import Data.Text (Text)
import qualified Data.Text as T
+import Data.Time.Format (defaultTimeLocale, formatTime)
import Data.Time.LocalTime (getZonedTime)
import Prelude hiding (FilePath)
import Shelly
@@ -152,7 +153,13 @@ logger :: Text -> Sh ()
logger t = do
fn <- pwd
currentTime <- liftIO getZonedTime
- echo $ bname fn <> " [" <> showT currentTime <> "] - " <> t
+ echo
+ $ "VeriFuzz ["
+ <> T.pack (formatTime defaultTimeLocale "%Y-%m-%d %H:%M:%S" currentTime)
+ <> "] "
+ <> bname fn
+ <> " - "
+ <> t
where bname = T.pack . takeBaseName . T.unpack . toTextIgnore
logCommand :: FilePath -> Text -> Sh a -> Sh a