Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Log to file (for now, better configuration file later)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdone committed Jan 11, 2014
1 parent ae36500 commit d5e222b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/TryHaskell.hs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,11 @@ eval stats =
do ip <- logVisit stats
mex <- getParam "exp"
args <- getParam "args"
liftIO (putStrLn (S.unpack (decodeUtf8 ip) ++
"> " ++
maybe "" (S.unpack . decodeUtf8) mex))
liftIO (appendFile "/tmp/tryhaskell-log"
(S.unpack (decodeUtf8 ip) ++
"> " ++
maybe "" (S.unpack . decodeUtf8) mex ++
"\n"))
case mex of
Nothing -> error "exp expected"
Just ex ->
Expand Down

0 comments on commit d5e222b

Please sign in to comment.