-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell bindings to libsystemd-journal -- -- Haskell bindings to libsystemd-journal @package libsystemd-journal @version 1.4.1 module Systemd.Journal -- | Send a message to the systemd journal. -- --
-- sendMessage t == sendJournalFields (message t) --sendMessage :: Text -> IO () -- | 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 sendMessageWith :: Text -> JournalFields -> IO () -- | Send an exact set of fields to the systemd journal. sendJournalFields :: JournalFields -> IO () -- | 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) --type JournalFields = HashMap JournalField ByteString -- | 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. message :: Text -> JournalFields -- | 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. messageId :: UUID -> JournalFields -- | A priority value compatible with syslog's priority concept. priority :: Priority -> JournalFields -- | Log messages have a priority attached. data Priority :: * -- | system is unusable Emergency :: Priority -- | action must be taken immediately Alert :: Priority -- | critical conditions Critical :: Priority -- | error conditions Error :: Priority -- | warning conditions Warning :: Priority -- | normal but significant condition Notice :: Priority -- | informational Info :: Priority -- | debug-level messages Debug :: Priority -- | The source code file generating this message. codeFile :: FilePath -> JournalFields -- | The source code line number generating this message. codeLine :: Int -> JournalFields -- | The source code function name generating this message. codeFunc :: Text -> JournalFields -- | The low-level Unix error number causing this entry, if any. Contains -- the numeric value of errno(3). errno :: Int -> JournalFields -- | Syslog compatibility field. syslogFacility :: Facility -> JournalFields -- | Syslog compatibility field. syslogIdentifier :: Text -> JournalFields -- | Syslog compatibility field. syslogPid :: CPid -> JournalFields data JournalField -- | Construct a JournalField by converting to uppercase, as -- required by the journal. mkJournalField :: Text -> JournalField -- | Extract the name of a JournalField. journalField :: JournalField -> Text -- | 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. openJournal :: MonadSafe m => [JournalFlag] -> Start -> Maybe Filter -> Maybe Integer -> Producer' JournalEntry m () -- | Where to begin reading the journal from. data Start -- | Begin reading from the start of the journal. FromStart :: Start -- | Begin reading from the end of the journal. FromEnd :: Direction -> Start -- | From a JournalEntryCursor. FromCursor :: JournalEntryCursor -> Direction -> Start -- | In which direction to read the journal. data Direction -- | Read towards the end. Forwards :: Direction -- | Read towards the beginning. Backwards :: Direction -- | An entry that has been read from the systemd journal. data JournalEntry type JournalEntryCursor = ByteString -- | A map of each JournalField to its value. journalEntryFields :: JournalEntry -> JournalFields -- | 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. journalEntryCursor :: JournalEntry -> JournalEntryCursor -- | The time (in microseconds since the epoch) when this journal entry was -- received by the systemd journal. journalEntryRealtime :: JournalEntry -> Word64 -- | Flags to specify which journal entries to read. data JournalFlag -- | Only journal files generated on the local machine will be opened. LocalOnly :: JournalFlag -- | Only volatile journal files will be opened, excluding those which are -- stored on persistent storage. RuntimeOnly :: JournalFlag -- | Only journal files of system services and the kernel (in opposition to -- user session processes) will be opened. SystemOnly :: JournalFlag -- | A logical expression to filter journal entries when reading the -- journal. data Filter -- | A binary exact match on a given JournalField. Match :: JournalField -> ByteString -> Filter -- | Logical conjunction of two filters. Will only show journal entries -- that satisfy both conditions. And :: Filter -> Filter -> Filter -- | Logical disjunction of two filters. Will show journal entries that -- satisfy either condition. Or :: Filter -> Filter -> Filter instance GHC.Classes.Eq Systemd.Journal.Direction instance GHC.Show.Show Systemd.Journal.Filter instance GHC.Classes.Eq Systemd.Journal.Filter instance Data.Data.Data Systemd.Journal.Filter instance GHC.Show.Show Systemd.Journal.JournalEntry instance GHC.Classes.Eq Systemd.Journal.JournalEntry instance GHC.Classes.Ord Systemd.Journal.JournalFlag instance GHC.Classes.Eq Systemd.Journal.JournalFlag instance GHC.Enum.Enum Systemd.Journal.JournalFlag instance GHC.Enum.Bounded Systemd.Journal.JournalFlag instance GHC.Base.Monoid Systemd.Journal.JournalField instance GHC.Show.Show Systemd.Journal.JournalField instance GHC.Read.Read Systemd.Journal.JournalField instance GHC.Classes.Ord Systemd.Journal.JournalField instance Data.Hashable.Class.Hashable Systemd.Journal.JournalField instance Data.Data.Data Systemd.Journal.JournalField instance GHC.Classes.Eq Systemd.Journal.JournalField instance Data.String.IsString Systemd.Journal.JournalField