diff options
author | Luca Boccassi <bluca@debian.org> | 2023-04-21 23:35:08 +0100 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2023-04-22 17:41:17 +0100 |
commit | c6b8fffdfaf1f7c9a1dac73e1e54993a06c766c0 (patch) | |
tree | b255471ff9a0d892af7c2927c5daa8585b8457c8 /man/org.freedesktop.LogControl1.xml | |
parent | 750d9859c139e0fac9d29d3e3147a4367f0fc764 (diff) | |
download | systemd-c6b8fffdfaf1f7c9a1dac73e1e54993a06c766c0.tar.gz |
man: add working example to LogControl1 manpage
Add fully working and documented example that can be copied and pasted
Diffstat (limited to 'man/org.freedesktop.LogControl1.xml')
-rw-r--r-- | man/org.freedesktop.LogControl1.xml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/man/org.freedesktop.LogControl1.xml b/man/org.freedesktop.LogControl1.xml index da6dd7628e..1694453baf 100644 --- a/man/org.freedesktop.LogControl1.xml +++ b/man/org.freedesktop.LogControl1.xml @@ -117,6 +117,20 @@ node /org/freedesktop/LogControl1 { </refsect1> <refsect1> + <title>Example</title> + + <example> + <title>Create a simple listener on the bus that implements LogControl1</title> + + <programlisting><xi:include href="logcontrol-example.c" parse="text"/></programlisting> + + <para>This creates a simple server on the bus. It implements the LogControl1 interface by providing + the required properties and allowing to set the writable ones. It logs at the configured log level using + <citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para> + </example> + </refsect1> + + <refsect1> <title>See Also</title> <para> <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, |