Safe Haskell | Safe-Infered |
---|
Fast logging system to copy log data directly to Handle buffer.
- data Logger
- mkLogger :: Bool -> Handle -> IO Logger
- renewLogger :: Logger -> Handle -> IO Logger
- 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.File
Logger
:: Bool | Automatically flush on each loggerPut? |
-> Handle | If |
-> 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.
LS !String | |
LB !ByteString |
Misc functions
File rotation
module System.Log.FastLogger.File