Hi guys,

I was trying to get my head around on how to provide multiple s6-log ‘watches’ 
for a single supervised process.


Imagine I have a single process which generates multiple kind of logs, for 
example, nginx, or even better mysql, which could generate three types of logs: 
general, error and slow-query. Piping all of them to the same destination in 
order to be eatable by s6-log, will converge typologies into one log processing 
chain.


Is it possible, somehow, create a multiplexer in order to know the source and 
then redirect to whatever destination I consider suitable?


I came across with a solution:


general   -> /dev/mypipe1 (prepend “g:”)  --\                 /-- if g  s6-log 
/generalpath
error     -> /dev/mypipe2 (prepend “e:”)  ---|— /dev/stdout -|--- if e  s6-log 
/errorpath
slow-quey -> /dev/mypipe3 (prepend “sq:”) --/                 \-- if sq s6-log 
/slow-query


But probably a better solution could be achieved and you already know how to 
solve this kind of problems. Is there any “best pattern” for this?


Thanks in advance,

Reply via email to