Re[2]: s6-log: Log rotation during shutdown
"Laurent Bercot" <[email protected]> Sat, 28 Feb 2026 00:03:42 +0000
| Newsgroups | gmane.comp.sysutils.supervision.general |
|---|---|
| Message-ID | <[email protected]> |
>There is no good reason, but from what I understood while reading >sources, SIGHUP will cause s6-log to read last lines and execute >log script, so that might be useful. It's also the case with SIGTERM. Unless the -p option is given, which you shouldn't use (it's a special option only used for the catch-all logger to make sure it doesn't die when the system gets shut down). SIGTERM is generally the correct signal to use to stop a long-lived process. >Also, have you considered combining =3D action and ! processor? >Not only to store matching log records, but also post-process them? >For example, if you see some periodic information let's say current >temperature, this way you can extract log line with that temperature, >and store just the numeric value in a file. There are lots of things that can be considered. I try to add as few features as possible, because doing otherwise is a surefire way to explode complexity. Having an idea and a theoretical example isn't close to compelling enough to clear the bar of "yes let's add this!". If you can come up with two real-life examples where the feature would be a significant improvement, where it makes a thing possible when it previously wasn't (or was significantly harder), then it's worth revisiting. -- Laurent