chiark / gitweb /
stdout-bridge: rename logger to stdout-syslog-bridge to make it more descriptive
authorLennart Poettering <lennart@poettering.net>
Tue, 30 Aug 2011 20:42:49 +0000 (22:42 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 30 Aug 2011 20:42:49 +0000 (22:42 +0200)
15 files changed:
.gitignore
Makefile.am
TODO
man/daemon.xml
man/systemd.exec.xml
man/systemd.special.xml.in
man/systemd.xml
src/execute.c
src/execute.h
src/special.h
src/stdout-syslog-bridge.c [moved from src/logger.c with 98% similarity]
src/unit.c
units/.gitignore
units/systemd-stdout-syslog-bridge.service.in [moved from units/systemd-logger.service.in with 84% similarity]
units/systemd-stdout-syslog-bridge.socket [moved from units/systemd-logger.socket with 93% similarity]

index 6cfb3ed2658cbc330910f3b95a6939273b37ec89..f4a8a45b4a10923b5341f3e728cbc3cd628afc12 100644 (file)
@@ -58,7 +58,7 @@ systemd-initctl
 systemd
 test-engine
 test-job-type
-systemd-logger
+systemd-stdout-syslog-bridge
 systemctl
 systemadm
 .dirstamp
index 56446b011f6d81f8b1b32fff13e0e1761c4c4219..b0c1d97e637254d645e3e5223b9e38fe339e8ee4 100644 (file)
@@ -150,7 +150,7 @@ bin_PROGRAMS += \
 endif
 
 rootlibexec_PROGRAMS = \
-       systemd-logger \
+       systemd-stdout-syslog-bridge \
        systemd-cgroups-agent \
        systemd-initctl \
        systemd-update-utmp \
@@ -354,7 +354,7 @@ dist_systemunit_DATA = \
        units/sockets.target \
        units/swap.target \
        units/systemd-initctl.socket \
-       units/systemd-logger.socket \
+       units/systemd-stdout-syslog-bridge.socket \
        units/systemd-shutdownd.socket \
        units/syslog.socket \
        units/dev-hugepages.automount \
@@ -395,7 +395,7 @@ nodist_systemunit_DATA = \
        units/serial-getty@.service \
        units/console-shell.service \
        units/systemd-initctl.service \
-       units/systemd-logger.service \
+       units/systemd-stdout-syslog-bridge.service \
        units/systemd-shutdownd.service \
        units/systemd-logind.service \
        units/systemd-kmsg-syslogd.service \
@@ -458,7 +458,7 @@ EXTRA_DIST = \
        units/console-shell.service.m4 \
        units/rescue.service.m4 \
        units/systemd-initctl.service.in \
-       units/systemd-logger.service.in \
+       units/systemd-stdout-syslog-bridge.service.in \
        units/systemd-shutdownd.service.in \
        units/systemd-logind.service.in \
        units/systemd-kmsg-syslogd.service.in \
@@ -946,11 +946,11 @@ test_install_CFLAGS = \
 test_install_LDADD = \
        libsystemd-basic.la
 
-systemd_logger_SOURCES = \
-       src/logger.c \
+systemd_stdout_syslog_bridge_SOURCES = \
+       src/stdout-syslog-bridge.c \
        src/tcpwrap.c
 
-systemd_logger_LDADD = \
+systemd_stdout_syslog_bridge_LDADD = \
        libsystemd-basic.la \
        libsystemd-daemon.la \
        $(LIBWRAP_LIBS)
@@ -1766,8 +1766,8 @@ endif
                rm -f user && \
                $(LN_S) $(pkgsysconfdir)/user user )
        ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
-               rm -f systemd-initctl.socket systemd-logger.socket systemd-shutdownd.socket syslog.socket && \
-               $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
+               rm -f systemd-initctl.socket systemd-stdout-syslog-bridge.socket systemd-shutdownd.socket syslog.socket && \
+               $(LN_S) ../systemd-stdout-syslog-bridge.socket systemd-stdout-syslog-bridge.socket && \
                $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
                $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket && \
                $(LN_S) ../syslog.socket syslog.socket )
diff --git a/TODO b/TODO
index 56d0a9df6fd0477cc459aadede9dab38463ea79f..6d562eabb5267ed0dfa95fac102cd9b2f7532371 100644 (file)
--- a/TODO
+++ b/TODO
@@ -39,8 +39,6 @@ Features:
 * allow Type=simple with PIDFile=
   https://bugzilla.redhat.com/show_bug.cgi?id=723942
 
-* rename systemd-logger to systemd-stdio-syslog-bridge
-
 * file bugs against sysklogd, syslog-ng because of StandardOuput=null
 * turn default stdout/stderr to syslog (after rsyslog got updated)
 
index d5a8491850aa21c53ef4e705a36d0883e9dde764..4673794f094a19bf1dd0ffc9acf6e688e4c1c3f9 100644 (file)
 
                                 <listitem><para>Instead of using the
                                 <function>syslog()</function> call to log directly to the
-                                system logger, a new-style daemon may
+                                system syslog service, a new-style daemon may
                                 choose to simply log to STDERR via
                                 <function>fprintf()</function>, which is then forwarded to
                                 syslog by the init system. If log
index bf32a89b3ad8297b70c600342dc66d30014385c1..c7da8e312e674e2c46211a350a7026aa6a294267 100644 (file)
                                 terminal. <option>syslog</option>
                                 connects standard output to the
                                 <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-                                system logger. <option>kmsg</option>
+                                system syslog
+                                service. <option>kmsg</option>
                                 connects it with the kernel log buffer
                                 which is accessible via
                                 <citerefentry><refentrytitle>dmesg</refentrytitle><manvolnum>1</manvolnum></citerefentry>. <option>syslog+console</option>
index 1369b4b822efa15b44bf9bd90adeac856e799678..218754051e945831a36c9b9981290d9edf60d07a 100644 (file)
@@ -80,8 +80,8 @@
                 <filename>syslog.target</filename>,
                 <filename>systemd-initctl.service</filename>,
                 <filename>systemd-initctl.socket</filename>,
-                <filename>systemd-logger.service</filename>,
-                <filename>systemd-logger.socket</filename>,
+                <filename>systemd-stdout-syslog-bridge.service</filename>,
+                <filename>systemd-stdout-syslog-bridge.socket</filename>,
                 <filename>time-sync.target</filename>,
                 <filename>umount.target</filename></para>
         </refsynopsisdiv>
                                 </listitem>
                         </varlistentry>
                         <varlistentry>
-                                <term><filename>systemd-logger.service</filename></term>
+                                <term><filename>systemd-stdout-syslog-bridge.service</filename></term>
                                 <listitem>
                                         <para>This is internally used
                                         by systemd to provide syslog
                                         maintains.</para>
                                         <para>This is a
                                         socket-activated service, see
-                                        <filename>system-logger.socket</filename>.</para>
+                                        <filename>system-stdout-syslog-bridge.socket</filename>.</para>
                                 </listitem>
                         </varlistentry>
                         <varlistentry>
-                                <term><filename>systemd-logger.socket</filename></term>
+                                <term><filename>systemd-stdout-syslog-bridge.socket</filename></term>
                                 <listitem>
                                         <para>Socket activation unit
                                         for
-                                        <filename>system-logger.service</filename>. systemd
+                                        <filename>system-stdout-syslog-bridge.service</filename>. systemd
                                         will automatically add
                                         dependencies of types Requires
                                         and After to all units that
index fc4810767ad1b301591c070e2c928f32de6f7cbe..d66b23027a512dc65409f5b268442462fef519e3 100644 (file)
                         </varlistentry>
 
                         <varlistentry>
-                                <term><filename>/run/systemd/logger</filename></term>
+                                <term><filename>/run/systemd/stdout-syslog-bridge</filename></term>
 
                                 <listitem><para>Used internally by the
-                                <filename>systemd-logger.service</filename>
+                                <filename>systemd-stdout-syslog-bridge.service</filename>
                                 unit to connect STDOUT and/or STDERR
                                 of spawned processes to
                                 <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
index 1ab321851792f8d772dd4176f38d4cfccb9948e9..53e7e77fdec0536bee1188940f88f322f9f22237 100644 (file)
@@ -188,9 +188,9 @@ static int connect_logger_as(const ExecContext *context, ExecOutput output, cons
 
         zero(sa);
         sa.sa.sa_family = AF_UNIX;
-        strncpy(sa.un.sun_path, LOGGER_SOCKET, sizeof(sa.un.sun_path));
+        strncpy(sa.un.sun_path, STDOUT_SYSLOG_BRIDGE_SOCKET, sizeof(sa.un.sun_path));
 
-        if (connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + sizeof(LOGGER_SOCKET) - 1) < 0) {
+        if (connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + sizeof(STDOUT_SYSLOG_BRIDGE_SOCKET) - 1) < 0) {
                 close_nointr_nofail(fd);
                 return -errno;
         }
index d5fb61ba265e6fad9a63a96259db1531327d58e5..77a2257e9be8ef91b425af0d0e640196eb5414b4 100644 (file)
@@ -40,7 +40,7 @@ struct CGroupAttribute;
 #include "list.h"
 #include "util.h"
 
-#define LOGGER_SOCKET "/run/systemd/logger"
+#define STDOUT_SYSLOG_BRIDGE_SOCKET "/run/systemd/stdout-syslog-bridge"
 
 typedef enum KillMode {
         KILL_CONTROL_GROUP = 0,
index 08dae11a2579c610dce95ccc3fd8e2445c2ae415..614e53ca1bcd4bf185de9f835ec9da84b84157d2 100644 (file)
@@ -68,7 +68,7 @@
 /* Services systemd relies on */
 #define SPECIAL_DBUS_SERVICE "dbus.service"
 #define SPECIAL_DBUS_SOCKET "dbus.socket"
-#define SPECIAL_LOGGER_SOCKET "systemd-logger.socket"
+#define SPECIAL_STDOUT_SYSLOG_BRIDGE_SOCKET "systemd-stdout-syslog-bridge.socket"
 #define SPECIAL_SYSLOG_SOCKET "syslog.socket"
 
 /* Magic init signals */
similarity index 98%
rename from src/logger.c
rename to src/stdout-syslog-bridge.c
index 435d5a7620d6521f9ccedaa04200bac915627d2b..48a301f6a711ffd2fb8d8213b4868abfed8fd70a 100644 (file)
@@ -409,7 +409,7 @@ static int stream_new(Server *s, int server_fd) {
                 return 0;
         }
 
-        if (!socket_tcpwrap(fd, "systemd-logger")) {
+        if (!socket_tcpwrap(fd, "systemd-stdout-syslog-bridge")) {
                 close_nointr_nofail(fd);
                 return 0;
         }
@@ -652,7 +652,7 @@ int main(int argc, char *argv[]) {
         if (server_init(&server, (unsigned) n) < 0)
                 return EXIT_FAILURE;
 
-        log_debug("systemd-logger running as pid %lu", (unsigned long) getpid());
+        log_debug("systemd-stdout-syslog-bridge running as pid %lu", (unsigned long) getpid());
 
         sd_notify(false,
                   "READY=1\n"
@@ -682,7 +682,7 @@ int main(int argc, char *argv[]) {
 
         r = EXIT_SUCCESS;
 
-        log_debug("systemd-logger stopped as pid %lu", (unsigned long) getpid());
+        log_debug("systemd-stdout-syslog-bridge stopped as pid %lu", (unsigned long) getpid());
 
 fail:
         sd_notify(false,
index e0f4a1bb31706f495ba3fcad5da80470c6efcf71..031e61993de4c46e3aef51e4d4074ed89dabe022 100644 (file)
@@ -573,7 +573,7 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c) {
          * logging daemon is run first. */
 
         if (u->meta.manager->running_as == MANAGER_SYSTEM)
-                if ((r = unit_add_two_dependencies_by_name(u, UNIT_REQUIRES, UNIT_AFTER, SPECIAL_LOGGER_SOCKET, NULL, true)) < 0)
+                if ((r = unit_add_two_dependencies_by_name(u, UNIT_REQUIRES, UNIT_AFTER, SPECIAL_STDOUT_SYSLOG_BRIDGE_SOCKET, NULL, true)) < 0)
                         return r;
 
         return 0;
index ac700e8044142a016d0d180ccca94d6afb367b8b..cc92c730220ab79c212d2cf41e2971a8ecf1cd78 100644 (file)
@@ -33,7 +33,7 @@ systemd-shutdownd.service
 systemd-random-seed-load.service
 systemd-random-seed-save.service
 systemd-initctl.service
-systemd-logger.service
+systemd-stdout-syslog-bridge.service
 getty@.service
 systemd-update-utmp-runlevel.service
 systemd-update-utmp-shutdown.service
similarity index 84%
rename from units/systemd-logger.service.in
rename to units/systemd-stdout-syslog-bridge.service.in
index 5f7fe40939f6ac78a0674c75d6ed10257af61c30..23a5137068f6ce6633fa54ddbd8925e1ac6ad7f3 100644 (file)
@@ -8,13 +8,13 @@
 # See systemd.special(7) for details
 
 [Unit]
-Description=Stdio Syslog Bridge
+Description=STDOUT Syslog Bridge
 DefaultDependencies=no
 Requires=syslog.socket
 After=syslog.socket
 
 [Service]
-ExecStart=@rootlibexecdir@/systemd-logger
+ExecStart=@rootlibexecdir@/systemd-stdout-syslog-bridge
 NotifyAccess=all
 StandardOutput=null
 CapabilityBoundingSet=CAP_SYS_ADMIN CAP_SETUID CAP_SETGID
similarity index 93%
rename from units/systemd-logger.socket
rename to units/systemd-stdout-syslog-bridge.socket
index 7178cc82468e05a8e03d6f8b6326926eececaaff..0706efd596fc8a7241ffaec379c7c282b465f8e0 100644 (file)
@@ -18,4 +18,4 @@ Before=sockets.target
 IgnoreOnIsolate=yes
 
 [Socket]
-ListenStream=/run/systemd/logger
+ListenStream=/run/systemd/stdout-syslog-bridge