Safe Haskell | None |
---|---|
Language | Haskell2010 |
Logging utility functions
Synopsis
- data LogMessage
- type ModLogger = LogFunc
- type Formatter = TimedFastLogger -> CallStack -> LogSource -> LogLevel -> Utf8Builder -> IO ()
- jsonFormatter :: Text -> Text -> Formatter
- newLogger :: LogType -> Formatter -> IO (TimedFastLogger, ModLogger)
- buildLogger :: Text -> Text -> IO ModLogger
Documentation
data LogMessage Source #
Instances
type Formatter = TimedFastLogger -> CallStack -> LogSource -> LogLevel -> Utf8Builder -> IO () Source #
newLogger :: LogType -> Formatter -> IO (TimedFastLogger, ModLogger) Source #
Creates a logger module using a given formatting function. | Also returns the underlying TimedFastLogger for use outside of your app (e.g. in some WAI middleware).
buildLogger :: Text -> Text -> IO ModLogger Source #
Convenient function to create json formatted logger with appName & appVer values