Copyright | Copyright (c) 2014-2015 PivotCloud, Inc. |
---|---|
License | Apache License, Version 2.0 |
Maintainer | Lars Kuhtz <lkuhtz@pivotmail.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
- data LoggerHandleConfig
- loggerHandleConfigText :: (IsString a, Monoid a) => LoggerHandleConfig -> a
- readLoggerHandleConfig :: (MonadError e m, Eq a, Show a, FoldCase a, IsText a, IsString e, Monoid e) => a -> m LoggerHandleConfig
- validateLoggerHandleConfig :: ConfigValidation LoggerHandleConfig λ
- pLoggerHandleConfig :: Parser LoggerHandleConfig
- pLoggerHandleConfig_ :: Text -> Parser LoggerHandleConfig
- data HandleBackendConfig = HandleBackendConfig {}
- handleBackendConfigHandle :: Lens' HandleBackendConfig LoggerHandleConfig
- handleBackendConfigColor :: Lens' HandleBackendConfig ColorOption
- defaultHandleBackendConfig :: HandleBackendConfig
- validateHandleBackendConfig :: ConfigValidation HandleBackendConfig []
- pHandleBackendConfig :: MParser HandleBackendConfig
- pHandleBackendConfig_ :: Text -> MParser HandleBackendConfig
- withHandleBackend :: (MonadIO m, MonadBaseControl IO m) => HandleBackendConfig -> (LoggerBackend Text -> m α) -> m α
- withHandleBackend_ :: (MonadIO m, MonadBaseControl IO m) => (msg -> Text) -> HandleBackendConfig -> (LoggerBackend msg -> m α) -> m α
- handleBackend :: Handle -> Bool -> LoggerBackend Text
- handleBackend_ :: (msg -> Text) -> Handle -> Bool -> LoggerBackend msg
Handle Configuration
data LoggerHandleConfig Source
loggerHandleConfigText :: (IsString a, Monoid a) => LoggerHandleConfig -> a Source
readLoggerHandleConfig :: (MonadError e m, Eq a, Show a, FoldCase a, IsText a, IsString e, Monoid e) => a -> m LoggerHandleConfig Source
:: Text | prefix for the command line options. |
-> Parser LoggerHandleConfig |
A version of pLoggerHandleConfig
that takes a prefix for the
command line option.
Since: 0.2
Backend Configuration
data HandleBackendConfig Source
HandleBackendConfig
:: Text | prefix for this and all subordinate command line options. |
-> MParser HandleBackendConfig |
A version of pLoggerHandleBackendConfig
that takes a prefix for the
command line option.
Since: 0.2
Backend Implementation
withHandleBackend :: (MonadIO m, MonadBaseControl IO m) => HandleBackendConfig -> (LoggerBackend Text -> m α) -> m α Source
:: (MonadIO m, MonadBaseControl IO m) | |
=> (msg -> Text) | formatting function for the log message |
-> HandleBackendConfig | |
-> (LoggerBackend msg -> m α) | |
-> m α |
A version of withHandleBackend
that is generic in the type
of the log message.
Since: 0.2.2
:: Handle | |
-> Bool | whether to use ANSI color escape codes |
-> LoggerBackend Text |
:: (msg -> Text) | formatting function for the log message |
-> Handle | |
-> Bool | whether to use ANSI color escape codes |
-> LoggerBackend msg |
A version of handleBackend
that is generic in the type of
the log message.
Since: 0.2.2