journalctl-stream-0.6.0.6: Stream logs using journalctl.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Systemd.Journalctl.Stream

Description

Streaming interface to journalctl. Use entryStream to stream journalctl entries as they are created.

Designed with qualified import in mind. For example, if you import it as Journal, then Entry becomes Journal.Entry, and Exception becomes Journal.Exception.

Synopsis

Journal entry

data Entry Source #

A journal entry.

Constructors

Entry 

Fields

Instances

Instances details
FromJSON Entry Source # 
Instance details

Defined in Systemd.Journalctl.Stream

Show Entry Source # 
Instance details

Defined in Systemd.Journalctl.Stream

Methods

showsPrec :: Int -> Entry -> ShowS #

show :: Entry -> String #

showList :: [Entry] -> ShowS #

data Cursor Source #

A cursor is an opaque text string that uniquely describes the position of an entry in the journal and is portable across machines, platforms and journal files.

The Ord instance does not order by time. Given two entries e1 and e2, e1 having an earlier timestamp than e2 doesn't mean that entryCursor e1 < entryCursor e2.

Instances

Instances details
FromJSON Cursor Source # 
Instance details

Defined in Systemd.Journalctl.Stream

ToJSON Cursor Source # 
Instance details

Defined in Systemd.Journalctl.Stream

Show Cursor Source # 
Instance details

Defined in Systemd.Journalctl.Stream

Eq Cursor Source # 
Instance details

Defined in Systemd.Journalctl.Stream

Methods

(==) :: Cursor -> Cursor -> Bool #

(/=) :: Cursor -> Cursor -> Bool #

Ord Cursor Source # 
Instance details

Defined in Systemd.Journalctl.Stream

Streaming

data StreamStart Source #

Where to start a stream.

Constructors

StartTime LocalTime

Start from the given time.

Lines Int

Start from the given number of lines back. You can use Lines 0 to start the stream without looking for previous lines.

AtCursor Cursor

Start at the given cursor.

AfterCursor Cursor

Start after the given cursor.

entryStream Source #

Arguments

:: (MonadResource m, MonadThrow m) 
=> StreamStart

Where to start streaming entries.

-> ConduitT i Entry m ()

Stream of journal entries.

Stream all journal entries starting from the given point.

Exceptions

data Exception Source #

Exception raised while streaming entries from journalctl.