module System.Log.Heavy.Shortcuts
(
reportError, warning, info, debug,
errorMessage, warnMessage, infoMessage, debugMessage
) where
import Control.Monad.Trans
import Control.Monad.Logger (LogLevel (..))
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Format.Heavy as F
import System.Log.Heavy.Types
import System.Log.Heavy.Backends
infoMessage :: F.VarContainer vars => TL.Text -> vars -> LogMessage
infoMessage fmt vars = LogMessage LevelInfo [] undefined fmt vars
debugMessage :: F.VarContainer vars => TL.Text -> vars -> LogMessage
debugMessage fmt vars = LogMessage LevelDebug [] undefined fmt vars
errorMessage :: F.VarContainer vars => TL.Text -> vars -> LogMessage
errorMessage fmt vars = LogMessage LevelError [] undefined fmt vars
warnMessage :: F.VarContainer vars => TL.Text -> vars -> LogMessage
warnMessage fmt vars = LogMessage LevelWarn [] undefined fmt vars
debug :: (F.VarContainer vars, MonadIO m) => TL.Text -> vars -> LoggingT m ()
debug fmt vars = logMessage $ debugMessage fmt vars
info :: (F.VarContainer vars, MonadIO m) => TL.Text -> vars -> LoggingT m ()
info fmt vars = logMessage $ infoMessage fmt vars
reportError :: (F.VarContainer vars, MonadIO m) => TL.Text -> vars -> LoggingT m ()
reportError fmt vars = logMessage $ errorMessage fmt vars
warning :: (F.VarContainer vars, MonadIO m) => TL.Text -> vars -> LoggingT m ()
warning fmt vars = logMessage $ warnMessage fmt vars