Blammo-1.0.2.3: Batteries-included Structured Logging library
Safe HaskellNone
LanguageHaskell2010

Blammo.Logging.Logger

Synopsis

Documentation

data Logger Source #

Instances

Instances details
HasLogger Logger Source # 
Instance details

Defined in Blammo.Logging.Logger

class HasLogger env where Source #

Methods

loggerL :: Lens' env Logger Source #

Instances

Instances details
HasLogger Logger Source # 
Instance details

Defined in Blammo.Logging.Logger

Testing

newTestLogger :: MonadIO m => LogSettings -> m Logger Source #

Create a Logger that will capture log messages instead of logging them

See Blammo.Logging.LoggedMessages for more details.

data LoggedMessage #

This type is the Haskell representation of each JSON log message produced by this library.

While we never interact with this type directly when logging messages with monad-logger-aeson, we may wish to use this type if we are parsing/processing log files generated by this library.

Since: monad-logger-aeson-0.1.0.0

Instances

Instances details
Eq LoggedMessage 
Instance details

Defined in Control.Monad.Logger.Aeson.Internal

Ord LoggedMessage 
Instance details

Defined in Control.Monad.Logger.Aeson.Internal

Show LoggedMessage 
Instance details

Defined in Control.Monad.Logger.Aeson.Internal

Generic LoggedMessage 
Instance details

Defined in Control.Monad.Logger.Aeson.Internal

Associated Types

type Rep LoggedMessage :: Type -> Type #

ToJSON LoggedMessage 
Instance details

Defined in Control.Monad.Logger.Aeson.Internal

FromJSON LoggedMessage 
Instance details

Defined in Control.Monad.Logger.Aeson.Internal

type Rep LoggedMessage 
Instance details

Defined in Control.Monad.Logger.Aeson.Internal

type Rep LoggedMessage = D1 ('MetaData "LoggedMessage" "Control.Monad.Logger.Aeson.Internal" "monad-logger-aeson-0.3.1.0-JTpy9a1oWGNKyAMakYLHOZ" 'False) (C1 ('MetaCons "LoggedMessage" 'PrefixI 'True) ((S1 ('MetaSel ('Just "loggedMessageTimestamp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UTCTime) :*: (S1 ('MetaSel ('Just "loggedMessageLevel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LogLevel) :*: S1 ('MetaSel ('Just "loggedMessageLoc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Loc)))) :*: ((S1 ('MetaSel ('Just "loggedMessageLogSource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LogSource)) :*: S1 ('MetaSel ('Just "loggedMessageThreadContext") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (KeyMap Value))) :*: (S1 ('MetaSel ('Just "loggedMessageText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "loggedMessageMeta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (KeyMap Value))))))

getLoggedMessages :: (MonadIO m, MonadReader env m, HasLogger env) => m [Either String LoggedMessage] Source #

Return the logged messages if newTestLogger was used

If not, the empty list is returned.

getLoggedMessagesLenient :: (MonadIO m, MonadReader env m, HasLogger env) => m [LoggedMessage] Source #

getLoggedMessages but ignore any messages that fail to parse

Deprecated

getLoggerLoggerSet :: Logger -> LoggerSet Source #

Deprecated: Internal function, will be removed in a future version