butler-0.0.1.0: At your service.
Safe HaskellSafe-Inferred
LanguageGHC2021

Butler.Core.Logger

Description

Logger provide system logs facility

Synopsis

Documentation

data Logger event #

data Event event #

Constructors

Event 

Fields

Instances

Instances details
Show event => Show (Event event) # 
Instance details

Defined in Butler.Core.Logger

Methods

showsPrec :: Int -> Event event -> ShowS #

show :: Event event -> String #

showList :: [Event event] -> ShowS #

Eq event => Eq (Event event) # 
Instance details

Defined in Butler.Core.Logger

Methods

(==) :: Event event -> Event event -> Bool #

(/=) :: Event event -> Event event -> Bool #

Ord event => Ord (Event event) # 
Instance details

Defined in Butler.Core.Logger

Methods

compare :: Event event -> Event event -> Ordering #

(<) :: Event event -> Event event -> Bool #

(<=) :: Event event -> Event event -> Bool #

(>) :: Event event -> Event event -> Bool #

(>=) :: Event event -> Event event -> Bool #

max :: Event event -> Event event -> Event event #

min :: Event event -> Event event -> Event event #

newtype LBSLog #

Constructors

LBSLog LByteString 

Instances

Instances details
ToJSON LBSLog # 
Instance details

Defined in Butler.Core.Logger

newtype BSLog #

Constructors

BSLog ByteString 

Instances

Instances details
ToJSON BSLog # 
Instance details

Defined in Butler.Core.Logger

newLogger :: Natural -> STM (Logger event) #

Write event

addEvent :: Logger event -> Time -> EventSeverity -> event -> STM () #

Read event

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))) #

Daemon

stdoutLogger :: From event Text => MonadUnliftIO m => Logger event -> m Void #