2016-06-01 20:31:34 +00:00
|
|
|
{-# LANGUAGE NoImplicitPrelude #-}
|
|
|
|
|
2016-08-27 16:31:32 +00:00
|
|
|
module Logger where
|
2016-06-01 20:31:34 +00:00
|
|
|
|
|
|
|
import ClassyPrelude
|
|
|
|
import Network.Socket (HostName, PortNumber)
|
|
|
|
import qualified System.Log.Logger as LOG
|
|
|
|
|
|
|
|
|
|
|
|
toStr :: (HostName, PortNumber) -> String
|
|
|
|
toStr (host, port) = fromString host <> ":" <> show port
|
|
|
|
|
|
|
|
err :: String -> IO()
|
|
|
|
err msg = LOG.errorM "wstunnel" $ "ERROR :: " <> msg
|
|
|
|
|
|
|
|
info :: String -> IO()
|
|
|
|
info = LOG.infoM "wstunnel"
|
|
|
|
|
|
|
|
debug :: String -> IO()
|
|
|
|
debug msg = LOG.debugM "wstunnel" $ "DEBUG :: " <> msg
|