micrologger-0.5.0.0: A super simple logging module.

Safe HaskellNone
LanguageHaskell2010

LuminescentDreams.Logger

Description

This is the main API module for the logger. You will generally want to import this directly.

Usage suggestions:

Synopsis

Documentation

data LogConfig Source #

Ordinary configurations for a file-based logger.

data LogLevel Source #

An ordinary hierarchy of logging priorities.

Instances

Eq LogLevel Source # 
Ord LogLevel Source # 
Show LogLevel Source # 
Buildable LogLevel Source #

Generate standard text representations of a log level. This is useful to the Standard logger but may not be interesting to any others.

Methods

build :: LogLevel -> Builder #

data Logger Source #

The primary data structure to contain a logger of any kind.

Constructors

Logger 

Fields

withLogger :: LogConfig -> (Logger -> IO a) -> IO a Source #

Run an IO action with a log safely available. Logs will be properly closed in the case of an exception. Logging is meant to happen to a file, specified in LogConfig, so this may not be suitable if you want to log to a different resource.