log-0.4: Structured logging solution with multiple backends

Safe HaskellNone
LanguageHaskell2010

Log.Class

Synopsis

Documentation

data UTCTime :: *

This is the simplest representation of UTC. It consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds.

Instances

Eq UTCTime 
Data UTCTime 
Ord UTCTime 
NFData UTCTime 
ToSQL UTCTime 
FromSQL UTCTime

FromSQL instance for ZonedTime doesn't exist because PostgreSQL doesn't provide zone offset information when returning timestamps with time zone in a binary format.

PQFormat UTCTime 
FormatTime UTCTime 
ParseTime UTCTime 
type PQDest UTCTime = PGtimestamp 
type PQBase UTCTime = PGtimestamp 

class Monad m => MonadTime m where

Class of monads which carry the notion of the current time.

Methods

currentTime :: m UTCTime

Instances

MonadTime IO

Base instance for IO.

(MonadTime m, MonadTrans t, Monad (t m)) => MonadTime (t m)

Generic, overlapping instance.

class MonadTime m => MonadLog m where Source

Represents the family of monads with logging capabilities.

Methods

logMessage :: UTCTime -> LogLevel -> Text -> Value -> m () Source

localData :: [Pair] -> m a -> m a Source

localDomain :: Text -> m a -> m a Source

Instances

(MonadLog m, Monad (t m), MonadTransControl t) => MonadLog (t m) Source

Generic, overlapping instance.

(MonadBase IO m, MonadTime m) => MonadLog (LogT m) Source 

logInfo :: MonadLog m => Text -> Value -> m () Source

logTrace :: MonadLog m => Text -> Value -> m () Source

logInfo_ :: MonadLog m => Text -> m () Source

logTrace_ :: MonadLog m => Text -> m () Source