{-# LANGUAGE UnicodeSyntax #-}
module MatrixBot.Bot.Jobs.Log
( logEventResponse
) where
import Data.Text (pack)
import qualified Control.Monad.Logger as ML
import qualified MatrixBot.MatrixApi as Api
import qualified MatrixBot.Log as L
logEventResponse ∷ ML.MonadLogger m ⇒ Api.EventResponse → m ()
logEventResponse :: forall (m :: * -> *). MonadLogger m => EventResponse -> m ()
logEventResponse = Text -> m ()
forall (m :: * -> *). (MonadLogger m, HasCallStack) => Text -> m ()
L.logDebug (Text -> m ()) -> (EventResponse -> Text) -> EventResponse -> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Text
pack (String -> Text)
-> (EventResponse -> String) -> EventResponse -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. EventId -> String
forall a. Show a => a -> String
show (EventId -> String)
-> (EventResponse -> EventId) -> EventResponse -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. EventResponse -> EventId
Api.eventResponseEventId