module Network.Wai.Logger.Prefork ( logCheck , logInit , logController , ApacheLogger , LogType(..) , FileLogSpec(..) , LogController ) where import Control.Concurrent import Control.Monad import Network.Wai.Logger.File import Network.Wai.Logger.Prefork.File import Network.Wai.Logger.Prefork.Stdout import Network.Wai.Logger.Prefork.Types logCheck :: LogType -> IO () logCheck LogNone = return () logCheck LogStdout = return () logCheck (LogFile spec) = check spec logInit :: LogType -> IO ApacheLogger logInit LogNone = noLoggerInit logInit LogStdout = stdoutLoggerInit logInit (LogFile spec) = fileLoggerInit spec noLoggerInit :: IO ApacheLogger noLoggerInit = return noLogger where noLogger _ _ _ = return () logController :: LogType -> LogController logController LogNone = noLoggerController logController LogStdout = noLoggerController logController (LogFile spec) = fileLoggerController spec noLoggerController :: LogController noLoggerController _ = forever $ threadDelay 10000000