Re: logging and mutualise outputs

From: Laurent Bercot <ska-supervision_at_skarnet.org>
Date: Fri, 3 Jun 2016 15:22:16 +0200

On 03/06/2016 14:53, Vincent de RIBOU via supervision wrote:
> what I am looking for is the way to get all
> processes outputs done by s6-log (or other loggers) to a unique
> file.

  I'm not sure what you want exactly, could you please elaborate?
  If what you need is to combine the contents of several log directories
into one single file, it's easy:

  - make sure your log files are all timestamped with the same format
(i.e. all TAI64N or all ISO 8601).
  - concatenate them all and sort the result.
  The resulting file will be a log file sorted chronologically.

for logdir in `cat logdir_list` ; do (cd $logdir && cat *.s *.u current) ; done | sort > logfile

  It's generally much easier to gather than to scatter, which is why the
logging chain model is superior to the syslogd model.
  
-- 
  Laurent
Received on Fri Jun 03 2016 - 13:22:16 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC