Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Logger provide system logs facility
Synopsis
- data Logger event
- data EventSeverity
- data Event event = Event {
- createdAt :: Time
- severity :: EventSeverity
- body :: event
- newtype LBSLog = LBSLog LByteString
- newtype BSLog = BSLog ByteString
- newLogger :: Natural -> STM (Logger event)
- addEvent :: Logger event -> Time -> EventSeverity -> event -> STM ()
- readLogs :: Logger event -> STM [Event event]
- getLogsChan :: Logger event -> STM (TChan (Event event))
- waitLog :: MonadIO m => Logger event -> Milli -> (event -> Bool) -> m (STM (WaitResult (Event event)))
- stdoutLogger :: From event Text => MonadUnliftIO m => Logger event -> m Void
Documentation
data EventSeverity #
Instances
Bounded EventSeverity # | |
Defined in Butler.Core.Logger | |
Show EventSeverity # | |
Defined in Butler.Core.Logger showsPrec :: Int -> EventSeverity -> ShowS # show :: EventSeverity -> String # showList :: [EventSeverity] -> ShowS # | |
Eq EventSeverity # | |
Defined in Butler.Core.Logger (==) :: EventSeverity -> EventSeverity -> Bool # (/=) :: EventSeverity -> EventSeverity -> Bool # | |
Ord EventSeverity # | |
Defined in Butler.Core.Logger compare :: EventSeverity -> EventSeverity -> Ordering # (<) :: EventSeverity -> EventSeverity -> Bool # (<=) :: EventSeverity -> EventSeverity -> Bool # (>) :: EventSeverity -> EventSeverity -> Bool # (>=) :: EventSeverity -> EventSeverity -> Bool # max :: EventSeverity -> EventSeverity -> EventSeverity # min :: EventSeverity -> EventSeverity -> EventSeverity # | |
From EventSeverity Text # | |
Defined in Butler.Core.Logger from :: EventSeverity -> Text # |
Instances
Show event => Show (Event event) # | |
Eq event => Eq (Event event) # | |
Ord event => Ord (Event event) # | |
Defined in Butler.Core.Logger |
Instances
ToJSON LBSLog # | |
Defined in Butler.Core.Logger |
Instances
ToJSON BSLog # | |
Defined in Butler.Core.Logger |
Write event
Read event
waitLog :: MonadIO m => Logger event -> Milli -> (event -> Bool) -> m (STM (WaitResult (Event event))) #
Daemon
stdoutLogger :: From event Text => MonadUnliftIO m => Logger event -> m Void #