diff options
author | Yann Herklotz <git@ymhg.org> | 2019-05-07 19:20:21 +0100 |
---|---|---|
committer | Yann Herklotz <git@ymhg.org> | 2019-05-07 19:20:21 +0100 |
commit | b073c6214dd62c9b8d30c5ec187375828c753d0e (patch) | |
tree | 2e9d60356cce48ab52c9aed74da589e5134e45e6 /src/VeriFuzz/Sim | |
parent | d52b98fb2672374c48f157aaa68483c39a46363d (diff) | |
download | verismith-b073c6214dd62c9b8d30c5ec187375828c753d0e.tar.gz verismith-b073c6214dd62c9b8d30c5ec187375828c753d0e.zip |
Create better command line output
Diffstat (limited to 'src/VeriFuzz/Sim')
-rw-r--r-- | src/VeriFuzz/Sim/Internal.hs | 9 |
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 |