Safe Haskell | None |
---|---|
Language | Haskell2010 |
Custom implementation of LogHandler
with log rotation support.
- data InvalidRotation = InvalidRotation !Text
- data RollerHandler = RollerHandler {
- rhPriority :: Priority
- rhFormatter :: LogFormatter RollerHandler
- rhFileHandle :: MVar Handle
- rhWriteAction :: Handle -> String -> IO ()
- rhCloseAction :: Handle -> IO ()
- logIndex :: FilePath -> Int -> FilePath
- rotationFileHandler :: MonadIO m => RotationParameters -> FilePath -> Priority -> 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 -> Priority -> m RollerHandler Source #
Create rotation logging handler.