From a688baa8b71f9c74500f7883dfb137194874266a Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Tue, 4 Jun 2013 22:31:05 -0400 Subject: journal: add ability to filter by current user This is the just the library part. SD_JOURNAL_CURRENT_USER flags is added to sd_j_open(), to open files from current user. SD_JOURNAL_SYSTEM_ONLY is renamed to SD_JOURNAL_SYSTEM, and changed to mean to (also) open system files. This way various flags can be combined, which gives them nicer semantics, especially if other ones are added later. Backwards compatibility is kept, because SD_JOURNAL_SYSTEM_ONLY is equivalent to SD_JOURNAL_SYSTEM if used alone, and before there we no other flags. --- man/sd_journal_open.xml | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) (limited to 'man/sd_journal_open.xml') diff --git a/man/sd_journal_open.xml b/man/sd_journal_open.xml index 76b857b991..dd2f32d81a 100644 --- a/man/sd_journal_open.xml +++ b/man/sd_journal_open.xml @@ -49,7 +49,8 @@ sd_journal SD_JOURNAL_LOCAL_ONLY SD_JOURNAL_RUNTIME_ONLY - SD_JOURNAL_SYSTEM_ONLY + SD_JOURNAL_SYSTEM + SD_JOURNAL_CURRENT_USER Open the system journal for reading @@ -93,10 +94,14 @@ be opened. SD_JOURNAL_RUNTIME_ONLY makes sure only volatile journal files will be opened, excluding those which are stored on persistent - storage. SD_JOURNAL_SYSTEM_ONLY - will ensure that only journal files of system services - and the kernel (in opposition to user session processes) will - be opened. + storage. SD_JOURNAL_SYSTEM + will cause journal files of system services and the + kernel (in opposition to user session processes) to + be opened. SD_JOURNAL_CURRENT_USER + will cause journal files of the current user to be + opened. If neither SD_JOURNAL_SYSTEM + nor SD_JOURNAL_CURRENT_USER are + specified, all journal file types will be opened. sd_journal_open_directory() is similar to sd_journal_open() @@ -170,6 +175,26 @@ file. + + History + + sd_journal_open(), + sd_journal_close(), + SD_JOURNAL_LOCAL_ONLY, + SD_JOURNAL_RUNTIME_ONLY, + SD_JOURNAL_SYSTEM_ONLY were added + in systemd-38. + + sd_journal_open_directory() + was added in systemd-187. + + SD_JOURNAL_SYSTEM and + SD_JOURNAL_CURRENT_USER were added + in systemd-205. + SD_JOURNAL_SYSTEM_ONLY + was deprecated. + + See Also -- cgit v1.2.3-54-g00ecf