3 ms·
I recommend that you learn from the world around you. This is a long since addressed problem. This is the way that the daemontools world has been addressing l
by JdeBP 10y ago
I recommend that you learn from the world around you. This is a long since addressed problem. This is the way that the daemontools world has been addressing logging since the middle 1990s, and there is a lot of design and implementation experience to draw upon and learn from.
The ideas of decoupling logs from lifetimes of the the things being logged, desynchronized log-watcher services that ship logs to central off-machine log stores, logging chains, shims for things that talk to syslog over AF_LOCAL or UDP sockets, shims for things that talk to the systemd journal using its idiosyncratic logging protocol, compartmentalized logging services that are protected by the operating system from compromises to the logged services, and persistent log pipes that do not lose log data; have all been designed and implemented.
* http://jdebp.eu./FGA/daemontools-family.html#Logging http://jdebp.eu./FGA/daemontools-family.html#Logging
* http://jdebp.eu./FGA/do-not-use-logrotate.html http://jdebp.eu./FGA/do-not-use-logrotate.html
* http://jdebp.eu./Softwares/nosh/guide/logging.html http://jdebp.eu./Softwares/nosh/guide/logging.html
* http://skarnet.org/software/s6/s6-log.html#diesyslogdiedie http://skarnet.org/software/s6/s6-log.html#diesyslogdiedie
* http://skarnet.org/software/s6/s6-log.html#loggingchain http://skarnet.org/software/s6/s6-log.html#loggingchain
* http://tinydns.org/#ContributedLogging http://tinydns.org/#ContributedLogging