2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
4 <!-- SPDX-License-Identifier: LGPL-2.1+ -->
6 <refentry id=
"org.freedesktop.LogControl1"
7 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
9 <title>org.freedesktop.LogControl1
</title>
10 <productname>systemd
</productname>
14 <refentrytitle>org.freedesktop.LogControl1
</refentrytitle>
15 <manvolnum>5</manvolnum>
19 <refname>org.freedesktop.LogControl1
</refname>
20 <refpurpose>D-Bus interface to query and set logging configuration
</refpurpose>
24 <title>Introduction
</title>
26 <para><interfacename>org.freedesktop.LogControl1
</interfacename> is a generic interface that is intended
27 to be used by any daemon which should allow setting the log level and target over D-Bus. It is implemented
28 by various daemons that are part of the
29 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry> suite.
</para>
31 <para>It is assumed that those settings are global for the whole program, so a fixed object path is
32 used. The interface should always be available under the path
33 <filename>/org/freedesktop/LogControl1
</filename>.
</para>
37 <title>Description
</title>
39 <para>The following interface is exposed:
</para>
41 <programlisting executable=
"systemd" node=
"/org/freedesktop/LogControl1" interface=
"org.freedesktop.LogControl1">
42 node /org/freedesktop/LogControl1 {
43 interface org.freedesktop.LogControl1 {
45 @org.freedesktop.DBus.Property.EmitsChangedSignal(
"false")
46 @org.freedesktop.systemd1.Privileged(
"true")
47 readwrite s LogLevel = '...';
48 @org.freedesktop.DBus.Property.EmitsChangedSignal(
"false")
49 @org.freedesktop.systemd1.Privileged(
"true")
50 readwrite s LogTarget = '...';
51 @org.freedesktop.DBus.Property.EmitsChangedSignal(
"false")
52 readonly s SyslogIdentifier = '...';
54 interface org.freedesktop.DBus.Peer { ... };
55 interface org.freedesktop.DBus.Introspectable { ... };
56 interface org.freedesktop.DBus.Properties { ... };
60 <!--Autogenerated cross-references for systemd.directives, do not edit-->
62 <variablelist class=
"dbus-interface" generated=
"True" extra-ref=
"org.freedesktop.LogControl1"/>
64 <variablelist class=
"dbus-interface" generated=
"True" extra-ref=
"org.freedesktop.LogControl1"/>
66 <variablelist class=
"dbus-property" generated=
"True" extra-ref=
"LogLevel"/>
68 <variablelist class=
"dbus-property" generated=
"True" extra-ref=
"LogTarget"/>
70 <variablelist class=
"dbus-property" generated=
"True" extra-ref=
"SyslogIdentifier"/>
72 <!--End of Autogenerated section-->
75 <title>Properties
</title>
77 <para><varname>LogLevel
</varname> describes the
78 <citerefentry><refentrytitle>syslog
</refentrytitle><manvolnum>3</manvolnum></citerefentry>-style
79 log-level, and should be one of
<literal>emerg
</literal>,
<literal>alert
</literal>,
80 <literal>crit
</literal>,
<literal>err
</literal>,
<literal>warning
</literal>,
<literal>notice
</literal>,
81 <literal>info
</literal>,
<literal>debug
</literal>, in order of increasing verbosity.
</para>
83 <para><varname>LogTarget
</varname> describes the log target (mechanism). It should be one of
84 <literal>console
</literal> (log to the console or standard output),
85 <literal>kmsg
</literal> (log to the kernel ring buffer),
86 <literal>journal
</literal> (log the the journal natively, see
87 <citerefentry><refentrytitle>systemd-journald.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>),
88 <literal>syslog
</literal> (log using the
89 <citerefentry><refentrytitle>syslog
</refentrytitle><manvolnum>3</manvolnum></citerefentry> call).
92 <para>Those two properties are writable, so they may be set by sufficiently privileged users.
</para>
94 <para><varname>SyslogIdentifier
</varname> is a read-only property that shows the
"syslog identifier".
95 It is a short string that identifies the program that is the source of log messages that is passed to
96 the
<citerefentry><refentrytitle>syslog
</refentrytitle><manvolnum>3</manvolnum></citerefentry> call.
99 <para>Note:
<command>journalctl
</command> option
<option>-p
</option>/
<option>--priority=
</option> may
100 be used to filter log messages by log level, option
<option>-t
</option>/
<option>--identifier=
</option>
101 may be used to by the syslog identifier, and filters like
<literal>_TRANSPORT=syslog
</literal>,
102 <literal>_TRANSPORT=journal
</literal>, and
<literal>_TRANSPORT=kernel
</literal> may be used to filter
103 messages by the mechanism through which they reached
<command>systemd-journald
</command>.
</para>