di-polysemy-0.2.0.0: DI logger wrapped for Polysemy
Safe HaskellNone
LanguageHaskell2010

DiPolysemy

Documentation

data Di level path msg m a where Source #

Constructors

Log :: level -> msg -> Di level path msg m () 
Flush :: Di level path msg m () 
Local :: (Di level path msg -> Di level path msg) -> m a -> Di level path msg m a 
Fetch :: Di level path msg m (Maybe (Di level path msg))

Fetch the current Di value, Maybe to allow for no-op implementations

Instances

Instances details
type DefiningModule Di Source # 
Instance details

Defined in DiPolysemy

type DefiningModule Di = "DiPolysemy"

runDiToIOReader :: forall r a level msg. Members '[Embed IO, Reader (Di level Path msg)] r => Sem (Di level Path msg ': r) a -> Sem r a Source #

runDiToIO :: forall r level msg a. Member (Embed IO) r => Di level Path msg -> Sem (Di level Path msg ': r) a -> Sem r a Source #

runDiNoop :: forall r level msg a. Sem (Di level Path msg ': r) a -> Sem r a Source #

log :: forall level path msg r. MemberWithError (Di level path msg) r => level -> msg -> Sem r () Source #

flush :: forall level path msg r. MemberWithError (Di level path msg) r => Sem r () Source #

local :: forall level path msg r a. MemberWithError (Di level path msg) r => (Di level path msg -> Di level path msg) -> Sem r a -> Sem r a Source #

fetch :: forall level path msg r. MemberWithError (Di level path msg) r => Sem r (Maybe (Di level path msg)) Source #

push :: forall level msg r a. Member (Di level Path msg) r => Segment -> Sem r a -> Sem r a Source #

attr_ :: forall level msg r a. Member (Di level Path msg) r => Key -> Value -> Sem r a -> Sem r a Source #

attr :: forall value level msg r a. (ToValue value, Member (Di level Path msg) r) => Key -> value -> Sem r a -> Sem r a Source #

debug :: forall msg path r. (ToMessage msg, Member (Di Level path Message) r) => msg -> Sem r () Source #

info :: forall msg path r. (ToMessage msg, Member (Di Level path Message) r) => msg -> Sem r () Source #

notice :: forall msg path r. (ToMessage msg, Member (Di Level path Message) r) => msg -> Sem r () Source #

warning :: forall msg path r. (ToMessage msg, Member (Di Level path Message) r) => msg -> Sem r () Source #

error :: forall msg path r. (ToMessage msg, Member (Di Level path Message) r) => msg -> Sem r () Source #

alert :: forall msg path r. (ToMessage msg, Member (Di Level path Message) r) => msg -> Sem r () Source #

critical :: forall msg path r. (ToMessage msg, Member (Di Level path Message) r) => msg -> Sem r () Source #

emergency :: forall msg path r. (ToMessage msg, Member (Di Level path Message) r) => msg -> Sem r () Source #

debug_ :: forall path r. Member (Di Level path Message) r => Message -> Sem r () Source #

info_ :: forall path r. Member (Di Level path Message) r => Message -> Sem r () Source #

notice_ :: forall path r. Member (Di Level path Message) r => Message -> Sem r () Source #

warning_ :: forall path r. Member (Di Level path Message) r => Message -> Sem r () Source #

error_ :: forall path r. Member (Di Level path Message) r => Message -> Sem r () Source #

alert_ :: forall path r. Member (Di Level path Message) r => Message -> Sem r () Source #

critical_ :: forall path r. Member (Di Level path Message) r => Message -> Sem r () Source #

emergency_ :: forall path r. Member (Di Level path Message) r => Message -> Sem r () Source #