module Control.Monad.Logger.CallStack (
module Log
, logDebug
, logInfo
, logWarn
, logError
, logOther
, logDebugSH
, logInfoSH
, logWarnSH
, logErrorSH
, logOtherSH
) where
import Control.Monad.Logger as Log hiding (logDebug, logDebugSH,
logError, logErrorSH, logInfo,
logInfoSH, logOther, logOtherSH,
logWarn, logWarnSH)
import Data.Text (Text)
import qualified Data.Text as Text
import GHC.Stack
logDebug :: (HasCallStack, Log.MonadLogger m) => Text -> m ()
logDebug :: Text -> m ()
logDebug = CallStack -> Text -> m ()
forall (m :: * -> *). MonadLogger m => CallStack -> Text -> m ()
Log.logDebugCS CallStack
HasCallStack => CallStack
callStack
logInfo :: (HasCallStack, Log.MonadLogger m) => Text -> m ()
logInfo :: Text -> m ()
logInfo = CallStack -> Text -> m ()
forall (m :: * -> *). MonadLogger m => CallStack -> Text -> m ()
Log.logInfoCS CallStack
HasCallStack => CallStack
callStack
logWarn :: (HasCallStack, Log.MonadLogger m) => Text -> m ()
logWarn :: Text -> m ()
logWarn = CallStack -> Text -> m ()
forall (m :: * -> *). MonadLogger m => CallStack -> Text -> m ()
Log.logWarnCS CallStack
HasCallStack => CallStack
callStack
logError :: (HasCallStack, Log.MonadLogger m) => Text -> m ()
logError :: Text -> m ()
logError = CallStack -> Text -> m ()
forall (m :: * -> *). MonadLogger m => CallStack -> Text -> m ()
Log.logErrorCS CallStack
HasCallStack => CallStack
callStack
logOther :: (HasCallStack, Log.MonadLogger m) => Log.LogLevel -> Text -> m ()
logOther :: LogLevel -> Text -> m ()
logOther = CallStack -> LogLevel -> Text -> m ()
forall (m :: * -> *).
MonadLogger m =>
CallStack -> LogLevel -> Text -> m ()
Log.logOtherCS CallStack
HasCallStack => CallStack
callStack
logDebugSH :: (HasCallStack, Log.MonadLogger m, Show a) => a -> m ()
logDebugSH :: a -> m ()
logDebugSH = CallStack -> Text -> m ()
forall (m :: * -> *). MonadLogger m => CallStack -> Text -> m ()
Log.logDebugCS CallStack
HasCallStack => CallStack
callStack (Text -> m ()) -> (a -> Text) -> a -> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Text
Text.pack (String -> Text) -> (a -> String) -> a -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> String
forall a. Show a => a -> String
show
logInfoSH :: (HasCallStack, Log.MonadLogger m, Show a) => a -> m ()
logInfoSH :: a -> m ()
logInfoSH = CallStack -> Text -> m ()
forall (m :: * -> *). MonadLogger m => CallStack -> Text -> m ()
Log.logInfoCS CallStack
HasCallStack => CallStack
callStack (Text -> m ()) -> (a -> Text) -> a -> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Text
Text.pack (String -> Text) -> (a -> String) -> a -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> String
forall a. Show a => a -> String
show
logWarnSH :: (HasCallStack, Log.MonadLogger m, Show a) => a -> m ()
logWarnSH :: a -> m ()
logWarnSH = CallStack -> Text -> m ()
forall (m :: * -> *). MonadLogger m => CallStack -> Text -> m ()
Log.logWarnCS CallStack
HasCallStack => CallStack
callStack (Text -> m ()) -> (a -> Text) -> a -> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Text
Text.pack (String -> Text) -> (a -> String) -> a -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> String
forall a. Show a => a -> String
show
logErrorSH :: (HasCallStack, Log.MonadLogger m, Show a) => a -> m ()
logErrorSH :: a -> m ()
logErrorSH = CallStack -> Text -> m ()
forall (m :: * -> *). MonadLogger m => CallStack -> Text -> m ()
Log.logErrorCS CallStack
HasCallStack => CallStack
callStack (Text -> m ()) -> (a -> Text) -> a -> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Text
Text.pack (String -> Text) -> (a -> String) -> a -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> String
forall a. Show a => a -> String
show
logOtherSH :: (HasCallStack, Log.MonadLogger m, Show a) => Log.LogLevel -> a -> m ()
logOtherSH :: LogLevel -> a -> m ()
logOtherSH LogLevel
lvl = CallStack -> LogLevel -> Text -> m ()
forall (m :: * -> *).
MonadLogger m =>
CallStack -> LogLevel -> Text -> m ()
Log.logOtherCS CallStack
HasCallStack => CallStack
callStack LogLevel
lvl (Text -> m ()) -> (a -> Text) -> a -> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Text
Text.pack (String -> Text) -> (a -> String) -> a -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> String
forall a. Show a => a -> String
show