]> git.proxmox.com Git - systemd.git/blobdiff - man/SD_ALERT.html
Imported Upstream version 221
[systemd.git] / man / SD_ALERT.html
index 63792bb2d1dd6c7fd3cc2a2b41a991b49f0f2b7d..49588115f0d3838eb5b6c9dba985cebfc835f030 100644 (file)
   </style><a href="index.html">Index </a>·
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
-  <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 214</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
-                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214188016064"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
-                for new-style daemons, as implemented by the
-                <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
-                init system.</p><p>See
-                <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
-                <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
-                <a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
-                <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
-                <a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
-                for more information about the functions
-                implemented. In addition to these functions, a couple
-                of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG   "&lt;0&gt;"  /* system is unusable */
+
+  <span style="float:right">systemd 221</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
+    new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm47486027730304"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs for new-style
+    daemons, as implemented by the
+    <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
+    init system.</p><p>See
+    <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
+    <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
+    <a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
+    <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
+    <a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
+    for more information about the functions implemented. In addition
+    to these functions, a couple of logging prefixes are defined as
+    macros:</p><pre class="programlisting">#define SD_EMERG   "&lt;0&gt;"  /* system is unusable */
 #define SD_ALERT   "&lt;1&gt;"  /* action must be taken immediately */
 #define SD_CRIT    "&lt;2&gt;"  /* critical conditions */
 #define SD_ERR     "&lt;3&gt;"  /* error conditions */
 #define SD_WARNING "&lt;4&gt;"  /* warning conditions */
 #define SD_NOTICE  "&lt;5&gt;"  /* normal but significant condition */
 #define SD_INFO    "&lt;6&gt;"  /* informational */
-#define SD_DEBUG   "&lt;7&gt;"  /* debug-level messages */</pre><p>These prefixes are intended to be used in
-                conjunction with stderr-based logging as implemented
-                by systemd. If a systemd service definition file is
-                configured with <code class="varname">StandardError=syslog</code>
-                or <code class="varname">StandardError=kmsg</code>, these
-                prefixes can be used to encode a log level in lines
-                printed. This is similar to the kernel
-                <code class="function">printk()</code>-style logging. See
-                <a href="klogctl.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
-                for more information.</p><p>The log levels are identical to
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
-                log level system. To use these prefixes simply prefix
-                every line with one of these strings. A line that is
-                not prefixed will be logged at the default log level
-                SD_INFO.</p><div class="example"><a name="idm214184167584"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
-                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214180497360"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+#define SD_DEBUG   "&lt;7&gt;"  /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
+    stderr-based logging as implemented by systemd. If a systemd
+    service definition file is configured with
+    <code class="varname">StandardError=journal</code>,
+    <code class="varname">StandardError=syslog</code> or
+    <code class="varname">StandardError=kmsg</code>, these prefixes can be used
+    to encode a log level in lines printed. This is similar to the
+    kernel <code class="function">printk()</code>-style logging. See
+    <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
+    for more information.</p><p>The log levels are identical to
+    <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
+    log level system. To use these prefixes simply prefix every line
+    with one of these strings. A line that is not prefixed will be
+    logged at the default log level SD_INFO.</p><div class="example"><a name="idm47486027717808"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level NOTICE by issuing this
+      call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm47486022730832"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214184164912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
-                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                        <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
-                        <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
-                        <a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
-                        <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
-                        <a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
-                        <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
-                        <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
-                        <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
-                        <a href="fprintf.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
-                        <a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                </p></div></div></body></html>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm47486027715408"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+      <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
+      <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
+      <a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
+      <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
+      <a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
+      <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
+      <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
+      <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
+      <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    </p></div></div></body></html>