This patch reverts back to the progress/status behavior of Finit < v3.0
because this is what most users expect, including the maintainer. The
resulting code and configure script is a lot simpler to understand and
maintain:
- No more --enable-progress or --enable-progress-classic configure
flags. Instead a progress_style variable in helpers.c that can
be changed at compile time for those that really need it.
- No more 'splash' kernel commnand line option. This turned out to
be *very* confusing to many users who believed it was some sort of
graphical splash screen à la Plymouth.
Also, when Finit debug is enabled we now have a global 'debug' flag
which now alo controls if klogctl() should be called to prevent the
kernel logs to the console or not.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Even musl libc supports %m today, as well as most syslog daemons, but
that's no excuse to use this.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This patch introduces the LOG_CONSOLE syslog facility for logging common
events. In industrial applications aiming for IEC 62443 compliance the
following events are central for system observability:
- Change of runlevel - i.e., starting up, shutting down, upgrade, etc.
Facility: console, severity: notice
- Service starting
Facility: console, severity: notice
- Service restarting
Facility: console, severity: notice
- Service stopping
Facility: console, severity: notice
- Service failed to start
Facility: console, severity: warning
The use of facility console for this makes it easier to filter out when
forwarding syslog messages from an embedded system to a remote log sink.
Otherwise messages of facility daemon would be used, which include a lot
more, and mostly irrelevant, information.
Signed-off-by: Jonas Holmberg <jonas.holmberg@westermo.se>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch is a follow-up to 1f1c2e0 which introduced the new semantics
for the very confusing quiet and silent modes.
The initial idea was to loosely follow the kernel cmdline 'quiet' option
and as a working concept this was good. The resulting code, however,
became unnecessarily complex and the configure options impossible to
explain.
With this patch the quiet mode, and thus the --disable-quiet configure
option, is removed. Finit now defaults to a sane behavior: services are
shown only at startup. The --enable-silent option works like it did
before, silencing everything.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch is the first in a series of changes to clean up the internal
logging APIs of Finit:
1. Convert log macros to use logit() for everything (this patch)
2. Set correct syslog() log level based on debug flag
3. Do closelog()/openlog() when toggling debug flag to control LOG_PERROR
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>