magicbane-0.3.0: A web framework that integrates Servant, RIO, EKG, fast-logger, wai-cli…

Safe HaskellNone
LanguageHaskell2010

Magicbane.Logging

Contents

Description

Provides logging via fast-logger in a Magicbane app context.

Synopsis

Documentation

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 Magicbane app (e.g. in some WAI middleware).

data LogType #

Logger Type.

Constructors

LogNone

No logging.

LogStdout BufSize

Logging to stdout. BufSize is a buffer size for each capability.

LogStderr BufSize

Logging to stderr. BufSize is a buffer size for each capability.

LogFileNoRotate FilePath BufSize

Logging to a file. BufSize is a buffer size for each capability.

LogFile FileLogSpec BufSize

Logging to a file. BufSize is a buffer size for each capability. File rotation is done on-demand.

LogCallback (LogStr -> IO ()) (IO ())

Logging with a log and flush action. run flush after log each message.

defaultBufSize :: BufSize #

The default buffer size (4,096 bytes).

Orphan instances

Has ModLogger α => HasLogFunc α Source # 
Instance details

Methods

logFuncL :: Lens' α LogFunc #