{- | Provides an implementation of the ghcide @Logger@ which uses
   @System.Log.Logger@ under the hood.
-}
module Ide.Logger
  (
    logm
  , debugm
  , warningm
  , errorm
  ) where

import           Control.Monad.IO.Class
import           System.Log.Logger

-- ---------------------------------------------------------------------

logm :: MonadIO m => String -> m ()
logm :: String -> m ()
logm String
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ String -> String -> IO ()
infoM String
"hls" String
s

debugm :: MonadIO m => String -> m ()
debugm :: String -> m ()
debugm String
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ String -> String -> IO ()
debugM String
"hls" String
s

warningm :: MonadIO m => String -> m ()
warningm :: String -> m ()
warningm String
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ String -> String -> IO ()
warningM String
"hls" String
s

errorm :: MonadIO m => String -> m ()
errorm :: String -> m ()
errorm String
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ String -> String -> IO ()
errorM String
"hls" String
s

-- ---------------------------------------------------------------------