logging
logging copied to clipboard
Locked file if `writeFileLogging` is used again
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Prelude hiding (log)
import Control.Logging
import Data.Text
main = do
withFileLogging "test.log" $ do
log "abc"
log "abcxyz"
--- The below never shows up
withFileLogging "test.log" $ do
log "test"
log "testxyz"
The above outputs:
runhaskell Main.hs
Main.hs: openFile: resource busy (file is locked)
And in the test.log there is only:
11:20:28 [INFO] abc
11:20:28 [INFO] abcxyz