morley-client-0.1.2: Client to interact with the Tezos blockchain
Safe HaskellNone
LanguageHaskell2010

Morley.Client.Logging

Description

A tiny abstraction layer over logging capability we use in morley-client.

We use the co-log package and this module reduces direct dependencies on co-log making our code more resistant to logging changes.

Synopsis

Documentation

type ClientLogAction m = LogAction m Message Source #

LogAction with fixed message parameter.

type WithClientLog env m = WithLog env Message m Source #

A specialization of WithLog constraint to the Message type. If we want to use another message type we can change this constraint and exported functions, presumably without breaking other code significantly.

logDebug :: WithLog env Message m => Text -> m () #

Logs the message with the Debug severity.

logInfo :: WithLog env Message m => Text -> m () #

Logs the message with the Info severity.

logWarning :: WithLog env Message m => Text -> m () #

Logs the message with the Warning severity.

logError :: WithLog env Message m => Text -> m () #

Logs the message with the Error severity.

logException :: forall e m env. (WithLog env Message m, Exception e) => e -> m () #

Logs Exception message with the Error severity.

logFlush :: MonadIO m => Handle -> LogAction m a Source #

This action can be used in combination with other actions to flush a handle every time you log anything.