di-df1-1.2: Write logs in the df1 format using the di logging framework

Safe HaskellNone
LanguageHaskell2010

Di.Df1.Monad

Contents

Description

This module exports an API compatible with Di.Monad.

Synopsis

Documentation

type Df1T = DiT Level Path Message Source #

Convenience type-synonym for a DiT restricted to all the df1 monomorphic types.

Df1T == DiT Level Path Message
   :: (* -> *) -> * -> *

Df1T m == DiT Level Path Message m
   :: * -> *

Df1T m a == DiT Level Path Message m a
   :: *

This type-synonym is not used within the di-df1 library itself because all functions exposed in the library have more general types. However, users are encouraged to use MonadDf1 if they find it useful to reduce boilerplate and improve type inferrence.

type MonadDf1 = MonadDi Level Path Message Source #

Convenience type-synonym for a MonadDi restricted to all the df1 monomorphic types.

MonadDf1 == MonadDi Level Path Message
   :: (* -> *) -> Constraint

MonadDf1 m == MonadDi Level Path Message m
   :: Constraint

This type-synonym is not used within the di-df1 library itself because all functions exposed in the library have more general types. However, users are encouraged to use MonadDf1 if they find it useful to reduce boilerplate and improve type inferrence.

Hierarchy

push Source #

Arguments

:: MonadDi level Path msg m 
=> Segment 
-> m a 
-> m a 

Push a new Segment to the MonadDi.

Metadata

attr Source #

Arguments

:: (MonadDi level Path msg m, ToValue value) 
=> Key 
-> value 
-> m a 
-> m a 

Push a new attribute Key and Value to the MonadDi.

attr_ Source #

Arguments

:: MonadDi level Path msg m 
=> Key 
-> Value 
-> m a 
-> m a 

Like attr, but takes a Value rather than any ToValue.

This helps with type inference in case you are trying to log a literal string and have the OverloadedStrings GHC extension enabled.

Logging

debug :: (MonadDi Level path Message m, ToMessage msg) => msg -> m () Source #

Log a message intended to be useful only when deliberately debugging a program.

info :: (MonadDi Level path Message m, ToMessage msg) => msg -> m () Source #

Log an informational message.

notice :: (MonadDi Level path Message m, ToMessage msg) => msg -> m () Source #

Log a condition that is not an error, but should possibly be handled specially.

warning :: (MonadDi Level path Message m, ToMessage msg) => msg -> m () Source #

Log a warning condition, such as an exception being gracefully handled or some missing configuration setting being assigned a default value.

error :: (MonadDi Level path Message m, ToMessage msg) => msg -> m () Source #

Log an error condition, such as an unhandled exception.

alert :: (MonadDi Level path Message m, ToMessage msg) => msg -> m () Source #

Log a condition that should be corrected immediately, such as a corrupted database.

critical :: (MonadDi Level path Message m, ToMessage msg) => msg -> m () Source #

Log a critical condition that could result in system failure, such as a disk running out of space.

emergency :: (MonadDi Level path Message m, ToMessage msg) => msg -> m () Source #

Log a message stating that the system is unusable.

Type-inference helpers

debug_ :: MonadDi Level path Message m => Message -> m () Source #

Like debug, but takes a Message rather than any ToMessage.

This helps with type inference in case you are trying to log a literal string and have the OverloadedStrings GHC extension enabled.

info_ :: MonadDi Level path Message m => Message -> m () Source #

Like info, but takes a Message rather than any ToMessage.

This helps with type inference in case you are trying to log a literal string and have the OverloadedStrings GHC extension enabled.

notice_ :: MonadDi Level path Message m => Message -> m () Source #

Like notice, but takes a Message rather than any ToMessage.

This helps with type inference in case you are trying to log a literal string and have the OverloadedStrings GHC extension enabled.

warning_ :: MonadDi Level path Message m => Message -> m () Source #

Like warning, but takes a Message rather than any ToMessage.

This helps with type inference in case you are trying to log a literal string and have the OverloadedStrings GHC extension enabled.

error_ :: MonadDi Level path Message m => Message -> m () Source #

Like error, but takes a Message rather than any ToMessage.

This helps with type inference in case you are trying to log a literal string and have the OverloadedStrings GHC extension enabled.

alert_ :: MonadDi Level path Message m => Message -> m () Source #

Like alert, but takes a Message rather than any ToMessage.

This helps with type inference in case you are trying to log a literal string and have the OverloadedStrings GHC extension enabled.

critical_ :: MonadDi Level path Message m => Message -> m () Source #

Like critical, but takes a Message rather than any ToMessage.

This helps with type inference in case you are trying to log a literal string and have the OverloadedStrings GHC extension enabled.

emergency_ :: MonadDi Level path Message m => Message -> m () Source #

Like emergency, but takes a Message rather than any ToMessage.

This helps with type inference in case you are trying to log a literal string and have the OverloadedStrings GHC extension enabled.