http-server-1.0.4: A library for writing Haskell web servers.

Portability
Stabilityprovisional
Maintainerdiatchki@galois.com
Safe HaskellSafe-Inferred

Network.HTTP.Server.Logger

Description

 

Synopsis

Documentation

data Logger Source

A type used by the server to report various events. Useful for debugging.

Constructors

Logger 

Fields

logInfo :: Int -> String -> IO ()
 
logDebug :: String -> IO ()
 
logError :: String -> IO ()
 
logWarning :: String -> IO ()
 
getLog :: Maybe Int -> (LogType -> Bool) -> IO [LogItem]
 

stdLogger :: LoggerSource

A logger that uses the standard output and standard error. Text is UTF8 encoded.

quietLogger :: LoggerSource

A logger that does not report anything.

utf8Logger :: Handle -> Handle -> LoggerSource

A logger that uses the given handles for output and errors.

data LogItem Source

Constructors

LogItem 

data LogType Source

Constructors

Error 
Warning 
Debug 
Info Int 

Instances