| Safe Haskell | Safe-Infered |
|---|
System.Log.FastLogger
Contents
Description
Fast logging system to copy log data directly to Handle buffer.
- data Logger
- mkLogger :: Bool -> Handle -> IO Logger
- mkLogger2 :: Bool -> Handle -> (DateCacheGetter, DateCacheCloser) -> IO Logger
- renewLogger :: Logger -> Handle -> IO Logger
- rmLogger :: Logger -> IO ()
- loggerPutStr :: Logger -> [LogStr] -> IO ()
- loggerPutBuilder :: Logger -> Builder -> IO ()
- loggerFlush :: Logger -> IO ()
- data LogStr
- = LS !String
- | LB !ByteString
- class ToLogStr a where
- loggerDate :: Logger -> IO ZonedDate
- module System.Log.FastLogger.Date
- module System.Log.FastLogger.File
Logger
Arguments
| :: Bool | Automatically flush on each loggerPut? |
| -> Handle | If |
| -> IO Logger |
Creates a Logger from the given handle.
(ondemandDateCacher zonedDateCacheConf) is used as a Date getter.
Arguments
| :: Bool | Automatically flush on each loggerPut? |
| -> Handle | If |
| -> (DateCacheGetter, DateCacheCloser) | Date getter/closer. E.g. ( |
| -> IO Logger |
Creates a Logger from the given handle.
Logging
loggerPutBuilder :: Logger -> Builder -> IO ()Source
The hPut function directory to copy Builder to the buffer.
The current implementation is inefficient at this moment.
This would replace loggerPutStr someday.
Strings
A date type to contain String and ByteString.
This data is exported so that format can be defined.
This would be replaced with Builder someday when
it can be written directly to Handle buffer.
Constructors
| LS !String | |
| LB !ByteString |
Instances
Date
module System.Log.FastLogger.Date
File rotation
module System.Log.FastLogger.File