@@ -99,7 +99,8 @@ The \fBdinit\fR daemon will simply exit rather than executing the \fB$$$SHUTDOWN
9999.TP
100100\fB\-q\fR, \fB\-\-quiet\fR
101101Run with no output to the terminal/console.
102- This disables service status messages and sets the log level for the console log to \fBNONE\fR.
102+ This disables service status messages and sets the log level for the console log to \fBnone\fR.
103+ To re-enable (some) output, use the \fB\-\-console\-level\fR option after this option.
103104.TP
104105\fB\-b\fR \fIpath\fR, \fB\-\-cgroup\-path\fR \fIpath\fR
105106Specify the path to resolve relative cgroup paths against.
@@ -123,6 +124,19 @@ be started.
123124\fBNote:\fR on Linux, if \fBdinit\fR is running as PID 1 and with UID 0, it may ignore "naked"
124125service names (without preceding \fB\-\-service\fR/\fB\-t\fR) provided on the command line.
125126See the \fBCOMMAND LINE FROM KERNEL\fR section.
127+ .TP
128+ \fB\-\-console\-level\fR \fIlevel\fR
129+ Specify the minimum log level of messages that should be logged to the console.
130+ From highest to lowest, the levels are \fBerror\fR, \fBwarn\fR, \fBinfo\fR and \fBdebug\fR.
131+ Use a level of \fBnone\fR to suppress all messages.
132+ Note that unless \fB\-\-quiet\fR (\fB\-q\fR) is also specified, service state change messages
133+ (service started, stopped etc) are always output.
134+ .TP
135+ \fB\-\-log\-level\fR \fIlevel\fR
136+ Specify the minimum log level of messages that should be sent to the primary log (syslog facility
137+ or file).
138+ From highest to lowest, the levels are \fBerror\fR, \fBwarn\fR, \fBinfo\fR and \fBdebug\fR.
139+ Use a level of \fBnone\fR to suppress all messages.
126140.\"
127141.SH SERVICE DESCRIPTION FILES
128142.\"
@@ -198,6 +212,26 @@ System shutdown or restart need to be handled by the primary \fBinit\fR, which s
198212\fBdinit\fR on normal startup, and terminate \fBdinit\fR before shutdown, by signalling it and
199213waiting for it to terminate after stopping services (possibly by invoking \fBdinitctl shutdown\fR).
200214.\"
215+ .SH LOGGING
216+ Dinit "logs" via two mechanisms simultaneously: the "console" (standard output, not necessarily associated
217+ with an actual console if \fBdinit\fR was started with output directed elsewhere) and the "main log facility"
218+ which is the syslog facility by default but which may be directed to a file.
219+
220+ Various options are available to control the types and "levels" of message that will be sent to each facility,
221+ and the destination of the main facility.
222+ The levels available (from low to high) are \fBdebug\fR, \fBnotice\fR, \fBwarn\fR, and \fBerror\fR.
223+ Selecting a particular log level for facility will cause the facility to receive messages of that level and higher.
224+ The special level \fBnone\fR inhibits a facility from receiving any messages.
225+
226+ Service status messages (service started or stopped) have a nominal level of \fBnotice\fR, except for failure
227+ which has a level of \fBerror\fR or \fBwarn\fR in case of transitive failure (due to a dependency).
228+ These messages are, by default, always issued to the console regardless of level, unless the \fB\-\-quiet\fR
229+ (\fB\-q\fR) option has been used.
230+
231+ To debug boot issues it may be useful to use \fB\-q\fR (which also sets the level to \fBnone\fR) and then
232+ also reset the level via the \fB\-\-console\-level\fR option to either \fBwarn\fR or \fBerror\fR.
233+ This will reduce noise in the output from successful service startup.
234+ .\"
201235.SH COMMAND LINE FROM KERNEL
202236.LP
203237When running as PID 1, \fBdinit\fR may process the command line differently, to compensate for kernel behaviour.
0 commit comments