Logging¶
By default, every service 66 starts gets its own logger — a dedicated
66-log process that captures what
the service writes and stores it, rotated and optionally timestamped, in a
human-readable file. This guide explains how that wiring works and how to tune
or disable it.
The pieces live in the frontend file: the Options key in
[Main], the StdOut/StdErr keys in [Execute], and the whole [Logger]
section.
How a service's log is wired¶
service stdout ──▶ 66-log ──▶ /var/log/66/<service>/current
(logger)
Three conditions must all hold for the automatic logger to exist (they do by default):
- The
logoption is not disabled. A logger is created unless you writeOptions = ( !log )in[Main]. StdOut(and/orStdIn) is left at its default, or set explicitly to66log. Routing stdout elsewhere (a file, the console…) bypasses the logger.- The
[Logger]section, if present, tunes it — it never creates it.
For a root service the log lands in /var/log/66/<service>/, for a regular
user in .66/log/<service>/. The live file is current; rotated files sit
beside it. File descriptors for the log pipes are kept alive by a small
fd-holder daemon, so logs survive a service restart without losing their pipe.
Reading logs¶
66 status foo
The status of a service ends with its most recent log lines. To read the whole
log, use 66 log — this is the native equivalent of journalctl:
66 log foo
It reads one service, the system catch-all (66 log system), or every source
interleaved in time order (66 log with no operand). It also follows a log as it
is written, and narrows by time or by pattern:
66 log --follow foo
66 log --since 2026-08-01 --grep 'fail' foo
Or follow the underlying file directly:
tail -F /var/log/66/foo/current
Tuning: the [Logger] section¶
Optional. It controls rotation and timestamping. It also accepts RunAs,
Execute and a single Timeout (the logger's start timeout — it has no stop
transition), behaving as in [Start].
[Logger]
Backup = 10
MaxSize = 1000000
Timestamp = iso
RunAs = user
| Key | Effect | Default |
|---|---|---|
Backup |
number of rotated files kept | 3 |
MaxSize |
bytes before a file rotates (min 4096) |
1000000 |
Timestamp |
tai, iso or none |
iso |
RunAs |
user the logger runs as | service owner |
taiprefixes each line with a TAI64N stamp (decode with a TAI64N timestamp converter for human-readable time).isoprefixes a local ISO-8601 date and time.nonewrites the line as-is.
Turning the logger off¶
Set the !log option in [Main]:
[Main]
Type = classic
Options = ( !log )
The service then inherits its parent's standard output, unless you redirect it
yourself with StdOut. See standard I/O redirection
for file:, console, syslog, null and the other targets.
Custom loggers¶
With a custom (shebang) Execute in [Logger], the Backup, MaxSize and
Timestamp keys have no effect: you write the logging command yourself in the
Execute field. Use this only when you need a logging pipeline 66-log cannot
express.
Where to go next¶
- frontend service file — every
[Logger]key. - Standard I/O redirection — where stdout/stderr can go.
- 66 log — read, follow and filter the logs.
- 66-status — read a service's recent log inline.