Send a message to the systemd journal.
sendMessage t == sendJournalFields (message t):: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Modulelibsystemd-journal-1.4.5.1GHC2021
Send a message to the systemd journal.
sendMessage t == sendJournalFields (message t)Send a message and supply extra fields.
Note: The MESSAGE field will be replaced with the first parameter to this
function. If you don't want this, use sendJournalFields
Send an exact set of fields to the systemd journal.
A structured object of all the fields in an entry in the journal. You generally don't construct this yourself, but you use the monoid instance and smart constructors below.
For example,
sendJournalFields (message "Oh god, it burns!" <> priority Emergency)The human readable message string for this entry. This is supposed to be the primary text shown to the user. It is usually not translated (but might be in some cases), and is not supposed to be parsed for meta data.
A 128bit message identifier ID for recognizing certain message types, if
this is desirable. Developers can generate a new ID for this purpose with
journalctl --new-id.
A priority value compatible with syslog's priority concept.
Log messages are prioritized with one of the following levels:
[minBound..maxBound] :: [Priority][Emergency,Alert,Critical,Error,Warning,Notice,Info,Debug]
The Ord instance for Priority considers the more urgent level lower than less urgent ones:
Emergency < DebugTrueminimum [minBound..maxBound] :: PriorityEmergencymaximum [minBound..maxBound] :: PriorityDebug
Bounded PriorityDefined in hsyslog-5.0.2 · System.Posix.Syslog.PriorityEnum PriorityDefined in hsyslog-5.0.2 · System.Posix.Syslog.PriorityEq PriorityDefined in hsyslog-5.0.2 · System.Posix.Syslog.PriorityOrd PriorityDefined in hsyslog-5.0.2 · System.Posix.Syslog.PriorityRead PriorityDefined in hsyslog-5.0.2 · System.Posix.Syslog.PriorityShow PriorityDefined in hsyslog-5.0.2 · System.Posix.Syslog.PriorityGeneric PriorityDefined in hsyslog-5.0.2 · System.Posix.Syslog.Prioritytype Rep Priority = D1 ('MetaData "Priority"
"System.Posix.Syslog.Priority"
"hsyslog-5.0.2-LavZ5H3gRaM3Eeayi295n"
'False) (((C1 ('MetaCons "Emergency"
'PrefixI 'False) U1 :+: C1 ('MetaCons "Alert"
'PrefixI 'False) U1) :+: (C1 ('MetaCons "Critical"
'PrefixI 'False) U1 :+: C1 ('MetaCons "Error"
'PrefixI 'False) U1)) :+: ((C1 ('MetaCons "Warning"
'PrefixI 'False) U1 :+: C1 ('MetaCons "Notice"
'PrefixI 'False) U1) :+: (C1 ('MetaCons "Info"
'PrefixI 'False) U1 :+: C1 ('MetaCons "Debug"
'PrefixI 'False) U1)))Defined in hsyslog-5.0.2 · System.Posix.Syslog.PriorityThe source code file generating this message.
The source code line number generating this message.
The source code function name generating this message.
The low-level Unix error number causing this entry, if any. Contains the
numeric value of errno(3).
Syslog compatibility field.
Syslog compatibility field.
Syslog compatibility field.
Eq JournalFieldDefined in libsystemd-journal-1.4.5.1 · Systemd.JournalData JournalFieldDefined in libsystemd-journal-1.4.5.1 · Systemd.JournalOrd JournalFieldDefined in libsystemd-journal-1.4.5.1 · Systemd.JournalRead JournalFieldDefined in libsystemd-journal-1.4.5.1 · Systemd.JournalShow JournalFieldDefined in libsystemd-journal-1.4.5.1 · Systemd.JournalIsString JournalFieldDefined in libsystemd-journal-1.4.5.1 · Systemd.JournalSemigroup JournalFieldDefined in libsystemd-journal-1.4.5.1 · Systemd.JournalMonoid JournalFieldDefined in libsystemd-journal-1.4.5.1 · Systemd.JournalHashable JournalFieldDefined in libsystemd-journal-1.4.5.1 · Systemd.JournalConstruct a JournalField by converting to uppercase, as required by the journal.
Extract the name of a JournalField.
openJournal :: MonadSafe m=> [JournalFlag]A list of flags taken under logical disjunction (or) to specify which journal files to open.
-> StartWhere to begin reading journal entries from.
-> Maybe FilterAn optional filter to apply the journal. Only entries satisfying the filter will be emitted.
-> Maybe IntegerThe data field size threshold, or Nothing for no field size limit
-> Producer' JournalEntry m ()Opens the journal for reading, optionally filtering the journal entries. Filters are defined as arbitrary binary expression trees, which are then rewritten to be in conjunctive normal form before filtering with systemd to comply with systemd's rule system.
Where to begin reading the journal from.
FromStartBegin reading from the start of the journal.
FromEnd DirectionBegin reading from the end of the journal.
FromCursor JournalEntryCursor DirectionFrom a JournalEntryCursor.
In which direction to read the journal.
An entry that has been read from the systemd journal.
Eq JournalEntryDefined in libsystemd-journal-1.4.5.1 · Systemd.JournalShow JournalEntryDefined in libsystemd-journal-1.4.5.1 · Systemd.JournalA map of each JournalField to its value.
A JournalCursor can be used as marker into the journal stream. This can
be used to re-open the journal at a specific point in the future, and
JournalCursors can be serialized to disk.
The time (in microseconds since the epoch) when this journal entry was received by the systemd journal.
Flags to specify which journal entries to read.
LocalOnlyOnly journal files generated on the local machine will be opened.
RuntimeOnlyOnly volatile journal files will be opened, excluding those which are stored on persistent storage.
SystemOnlyOnly journal files of system services and the kernel (in opposition to user session processes) will be opened.
Bounded JournalFlagDefined in libsystemd-journal-1.4.5.1 · Systemd.JournalEnum JournalFlagDefined in libsystemd-journal-1.4.5.1 · Systemd.JournalEq JournalFlagDefined in libsystemd-journal-1.4.5.1 · Systemd.JournalOrd JournalFlagDefined in libsystemd-journal-1.4.5.1 · Systemd.JournalA logical expression to filter journal entries when reading the journal.
Match JournalField ByteStringA binary exact match on a given JournalField.
And Filter FilterLogical conjunction of two filters. Will only show journal entries that satisfy both conditions.
Or Filter FilterLogical disjunction of two filters. Will show journal entries that satisfy either condition.