yesod-core-0.9.4.1: Creation of type-safe, RESTful web applications.

Yesod.Logger

Synopsis

- data Logger
- makeLogger :: IO Logger
- makeLoggerWithHandle :: Handle -> IO Logger
- makeDefaultLogger :: IO Logger
- flushLogger :: Logger -> IO ()
- timed :: MonadIO m => Logger -> Text -> m a -> m a
- logText :: Logger -> Text -> IO ()
- logLazyText :: Logger -> Text -> IO ()
- logString :: Logger -> String -> IO ()
- logBS :: Logger -> ByteString -> IO ()
- logMsg :: Logger -> [LogStr] -> IO ()
- formatLogText :: Logger -> Loc -> LogLevel -> Text -> IO [LogStr]

# Documentation

data Logger

makeLogger :: IO Logger

makeLoggerWithHandle :: Handle -> IO Logger

makeDefaultLogger :: IO Logger

uses stdout handle

flushLogger :: Logger -> IO ()

timed

Arguments

:: MonadIO m |
=> Logger | Logger
-> Text | Message
-> m a | Action
-> m a | Timed and logged action

Execute a monadic action and log the duration

logText :: Logger -> Text -> IO ()

logLazyText :: Logger -> Text -> IO ()

logString :: Logger -> String -> IO ()

logBS :: Logger -> ByteString -> IO ()

logMsg :: Logger -> [LogStr] -> IO ()

formatLogText :: Logger -> Loc -> LogLevel -> Text -> IO [LogStr]