log-warper-1.1.4: Flexible, configurable, monadic and pretty logging

Copyright(c) Serokell 2016
LicenseGPL-3 (see the file LICENSE)
MaintainerSerokell <hi@serokell.io>
Stabilityexperimental
PortabilityPOSIX, GHC
Safe HaskellNone
LanguageHaskell2010

System.Wlog.LoggerConfig

Contents

Description

Logger configuration.

Synopsis

Documentation

fromScratch :: Monoid m => State m a -> m Source #

Useful lens combinator to be used for logging initialization. Usually should be used with zoomLogger.

isValidRotation :: RotationParameters -> Bool Source #

Checks if logger rotation parameters are valid.

Hierarchical tree of loggers (with lenses)

data HandlerWrap Source #

Wrapper over file handler with additional rounding option.

Constructors

HandlerWrap 

Fields

data LoggerTree Source #

Stores configuration for hierarchical loggers.

Global logger configuration

data LoggerConfig Source #

Logger configuration which keeps RotationParameters and LoggerTree.

Constructors

LoggerConfig 

Fields

Instances

Monoid LoggerConfig Source # 
ToJSON LoggerConfig Source #

This instances violates fromJSON . toJSON = identity rule but doesn't matter because it is used only for debugging.

FromJSON LoggerConfig Source # 

Lenses

zoomLogger :: Text -> State LoggerTree () -> State LoggerTree () Source #

Zooming into logger name with putting specific key.

Builders for LoggerConfig

productionB :: LoggerConfig Source #

Adds sensible predefined set of parameters to logger.