Safe Haskell | None |
---|---|
Language | Haskell2010 |
Custom implementation of LogHandler
with log rotation support.
- data InvalidRotation = InvalidRotation !Text
- data RollerHandler = RollerHandler {
- rhSeverity :: !Severity
- rhFormatter :: !(LogFormatter RollerHandler)
- rhFileHandle :: !(MVar Handle)
- rhWriteAction :: !(Handle -> Text -> IO ())
- rhCloseAction :: !(Handle -> IO ())
- rhFileName :: !FilePath
- logIndex :: FilePath -> Int -> FilePath
- rotationFileHandler :: MonadIO m => RotationParameters -> FilePath -> Severity -> m RollerHandler
Documentation
data InvalidRotation Source #
data RollerHandler Source #
Similar to GenericHandler
. But holds file Handle
inside
mutable variable (MVar
) to be able to rotate loggers.
RollerHandler | |
|
rotationFileHandler :: MonadIO m => RotationParameters -> FilePath -> Severity -> m RollerHandler Source #
Create rotation logging handler.