libsystemd-journal 1.3.3 → 1.3.4
raw patch · 3 files changed
+19/−3 lines, 3 filesdep ~vector
Dependency ranges changed: vector
Files
- Changelog.md +6/−0
- libsystemd-journal.cabal +2/−2
- src/Systemd/Journal.hsc +11/−1
Changelog.md view
@@ -1,3 +1,9 @@+# 1.3.4++* Added the `journalEntryRealtime` property to `JournalEntry`s. This is backed by a call to+ `sd_journal_get_realtime_usec`.+* Build with `vector` < 0.12.+ # 1.3.3 * Added `journalField :: JournalField -> Text`, to view the name of a `JournalField` as `Text`.
libsystemd-journal.cabal view
@@ -1,5 +1,5 @@ name: libsystemd-journal-version: 1.3.3+version: 1.3.4 synopsis: Haskell bindings to libsystemd-journal homepage: http://github.com/ocharles/libsystemd-journal license: BSD3@@ -16,7 +16,7 @@ library exposed-modules: Systemd.Journal- build-depends: base >=4.6 && <4.9, bytestring >= 0.9.1, pipes >= 4.0, pipes-safe >= 2.0, text >= 0.1 && < 1.3, transformers >= 0.3, unix-bytestring >= 0.3.2 && < 0.4, vector >= 0.4 && < 0.11, uuid, unordered-containers >= 0.1 && < 0.3, hashable >= 1.1.2.5, hsyslog, uniplate >= 1.6+ build-depends: base >=4.6 && <4.9, bytestring >= 0.9.1, pipes >= 4.0, pipes-safe >= 2.0, text >= 0.1 && < 1.3, transformers >= 0.3, unix-bytestring >= 0.3.2 && < 0.4, vector >= 0.4 && < 0.12, uuid, unordered-containers >= 0.1 && < 0.3, hashable >= 1.1.2.5, hsyslog, uniplate >= 1.6 hs-source-dirs: src default-language: Haskell2010 pkgconfig-depends: libsystemd >= 209
src/Systemd/Journal.hsc view
@@ -34,7 +34,7 @@ , openJournal , Start(..) , JournalEntry, JournalEntryCursor- , journalEntryFields, journalEntryCursor+ , journalEntryFields, journalEntryCursor, journalEntryRealtime , JournalFlag (..) , Filter (..) ) where@@ -242,6 +242,9 @@ foreign import ccall "strerror" c'strerror :: #{type int} -> IO CString +foreign import ccall "sd_journal_get_realtime_usec"+ sdJournalGetRealtimeUsec :: Ptr JournalEntry -> Ptr #{type uint64_t} -> IO #{type int}+ -------------------------------------------------------------------------------- -- | Flags to specify which journal entries to read. data JournalFlag@@ -268,6 +271,10 @@ -- ^ 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 -- 'JournalCursor's can be serialized to disk.++ , journalEntryRealtime :: Word64+ -- ^ The time (in microseconds since the epoch) when this journal entry was+ -- received by the systemd journal. } deriving (Eq, Show) @@ -396,6 +403,9 @@ sdJournalGetCursor journalPtr cursorStrPtr cursorCString <- peek cursorStrPtr BS.packCString cursorCString <* free cursorCString)+ <*> (alloca $ \realtimePtr -> do+ sdJournalGetRealtimeUsec journalPtr realtimePtr+ peek realtimePtr) Pipes.yield entry