Copyright | Copyright © 2015 PivotCloud, Inc. |
---|---|
License | Apache-2.0 |
Maintainer | Lars Kuhtz <lkuhtz@pivotmail.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
This module re-exports the logger interface from System.Logger.Types and the implementation of that interface from System.Logger.Logger and System.Logger.Backend.Handle.
- withConsoleLogger :: (MonadIO m, MonadBaseControl IO m) => LogLevel -> LoggerT Text m α -> m α
- withFileLogger :: (MonadIO m, MonadBaseControl IO m) => FilePath -> LogLevel -> LoggerT Text m α -> m α
- module System.Logger.Types
- module System.Logger.Logger
- module System.Logger.Backend.Handle
- data LogConfig = LogConfig {}
- logConfigLogger :: Lens' LogConfig LoggerConfig
- logConfigBackend :: Lens' LogConfig HandleBackendConfig
- defaultLogConfig :: LogConfig
- validateLogConfig :: ConfigValidation LogConfig []
- pLogConfig :: MParser LogConfig
- pLogConfig_ :: Text -> MParser LogConfig
Documentation
withConsoleLogger :: (MonadIO m, MonadBaseControl IO m) => LogLevel -> LoggerT Text m α -> m α Source
A simple console logger
import System.Logger main ∷ IO () main = withConsoleLogger Info $ do logg Info "moin" withLabel ("function", "f") f logg Warn "tschüss" where f = withLevel Debug $ do logg Debug "debug f"
withFileLogger :: (MonadIO m, MonadBaseControl IO m) => FilePath -> LogLevel -> LoggerT Text m α -> m α Source
A simple file logger
Logger Interface
module System.Logger.Types
Yet Another Logger
module System.Logger.Logger
Handle Backend
module System.Logger.Backend.Handle
Logging System Configuration
A version of pLogConfig
that takes a prefix for the command
line option.
Since: 0.2