-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Simplified logging in IO for application writers. -- @package logging @version 3.0.1 -- | Quick example of how to use this module: -- --
--   import Control.Logging
--   
--   main = withStdoutLogging $ do
--       log "This is a log message!"
--       timedLog "This is a timed log message!" $ threadDelay 100000
--   
module Control.Logging log :: Text -> IO () -- | The apostrophe varients of the logging functions flush the log after -- each message. log' :: MonadIO m => Text -> m () logS :: Text -> Text -> IO () logS' :: MonadIO m => Text -> Text -> m () warn :: Text -> IO () warn' :: MonadIO m => Text -> m () warnS :: Text -> Text -> IO () warnS' :: MonadIO m => Text -> Text -> m () debug :: Text -> IO () debug' :: MonadIO m => Text -> m () debugS :: Text -> Text -> IO () debugS' :: MonadIO m => Text -> Text -> m () -- | A logging variant of error which uses unsafePerformIO to -- output a log message before calling error. errorL :: Text -> a errorL' :: Text -> a errorSL :: Text -> Text -> a errorSL' :: Text -> Text -> a traceL :: Text -> a -> a traceL' :: Text -> a -> a traceSL :: Text -> Text -> a -> a traceSL' :: Text -> Text -> a -> a traceShowL :: Show a => a -> a1 -> a1 traceShowL' :: Show a => a -> a1 -> a1 traceShowSL :: Show a => Text -> a -> a1 -> a1 traceShowSL' :: Show a => Text -> a -> a1 -> a1 -- | Output a logging message both before an action begins, and after it -- ends, reporting the total length of time. If an exception occurred, it -- is also reported. timedLog :: (MonadBaseControl IO m, MonadIO m) => Text -> m a -> m a timedLog' :: (MonadBaseControl IO m, MonadIO m) => Text -> m a -> m a timedLogS :: (MonadBaseControl IO m, MonadIO m) => Text -> Text -> m a -> m a timedLogS' :: (MonadBaseControl IO m, MonadIO m) => Text -> Text -> m a -> m a -- | Like timedLog, except that it does only logs when the action -- has completed or failed after it is done. timedLogEnd :: (MonadBaseControl IO m, MonadIO m) => Text -> m a -> m a timedLogEnd' :: (MonadBaseControl IO m, MonadIO m) => Text -> m a -> m a timedLogEndS :: (MonadBaseControl IO m, MonadIO m) => Text -> Text -> m a -> m a timedLogEndS' :: (MonadBaseControl IO m, MonadIO m) => Text -> Text -> m a -> m a -- | A debug variant of timedLog. timedDebug :: (MonadBaseControl IO m, MonadIO m) => Text -> m a -> m a timedDebug' :: (MonadBaseControl IO m, MonadIO m) => Text -> m a -> m a timedDebugS :: (MonadBaseControl IO m, MonadIO m) => Text -> Text -> m a -> m a timedDebugS' :: (MonadBaseControl IO m, MonadIO m) => Text -> Text -> m a -> m a timedDebugEnd :: (MonadBaseControl IO m, MonadIO m) => Text -> m a -> m a timedDebugEnd' :: (MonadBaseControl IO m, MonadIO m) => Text -> m a -> m a timedDebugEndS :: (MonadBaseControl IO m, MonadIO m) => Text -> Text -> m a -> m a timedDebugEndS' :: (MonadBaseControl IO m, MonadIO m) => Text -> Text -> m a -> m a -- | This function, or withStderrLogging, must be wrapped around -- whatever region of your application intends to use logging. Typically -- it would be wrapped around the body of main. withStdoutLogging :: (MonadBaseControl IO m, MonadIO m) => m a -> m a withStderrLogging :: (MonadBaseControl IO m, MonadIO m) => m a -> m a withFileLogging :: (MonadBaseControl IO m, MonadIO m) => FilePath -> m a -> m a -- | Flush all collected logging messages. This is automatically called by -- withStdoutLogging and withStderrLogging when those -- blocks are exited by whatever means. flushLog :: MonadIO m => m () loggingLogger :: ToLogStr msg => LogLevel -> LogSource -> msg -> IO () -- | Set the verbosity level. Messages at our higher than this level are -- displayed. It defaults to LevelDebug. setLogLevel :: LogLevel -> IO () -- | Set the format used for log timestamps. setLogTimeFormat :: String -> IO () -- | When printing LevelDebug messages, only display those matching -- the given regexp applied to the Source parameter. Calls to -- debug without a source parameter are regarded as having a -- source of "". setDebugSourceRegex :: String -> IO () instance Eq LogLevel instance Show LogLevel instance Read LogLevel instance Ord LogLevel