hakyll-3.5.0.0: A static website compiler library

Safe HaskellNone

Hakyll.Core.Logger

Description

Produce pretty, thread-safe logs

Synopsis

Documentation

data Logger Source

Logger structure. Very complicated.

makeLogger :: (String -> IO ()) -> IO LoggerSource

Create a new logger

flushLogger :: Logger -> IO ()Source

Flush the logger (blocks until flushed)

sectionSource

Arguments

:: MonadIO m 
=> Logger

Logger

-> String

Section name

-> m ()

No result

Start a section in the log

timedSource

Arguments

:: MonadIO m 
=> Logger

Logger

-> String

Message

-> m a

Action

-> m a

Timed and logged action

Execute a monadic action and log the duration

reportSource

Arguments

:: MonadIO m 
=> Logger

Logger

-> String

Message

-> m ()

No result

Log something at the same level as timed, but without the timing

thrownSource

Arguments

:: MonadIO m 
=> Logger

Logger

-> String

Message

-> m ()

No result

Log an error that was thrown in the compilation phase