From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6582 invoked from network); 13 Jun 2020 11:17:31 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 13 Jun 2020 11:17:31 -0000 Received: (qmail 26500 invoked by uid 89); 13 Jun 2020 11:17:54 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 26493 invoked from network); 13 Jun 2020 11:17:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tunnel53-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=1r+1mqZRVN6OHTqes1getHoGzNPIYfm/PbtxPcaXydU=; b=GEIz7UI2cd9pekg4aNFvxAmYWH/uPumG4bO+ysEShDxYo9Ku+zhL2kBW1tZZ23Cgf/ hgeHDChGT8hYKFVaKY63/MhtnfYcJGDjg/scCoCfWO7o9LJgTnnTAJ2oWLbQ1k2LRxNi 8EkSHz58q4Nu5UCVAFK9X4u3THXyxiMNbmp1Tyn5Nq9A0hvQjgT9cU07yQPzjd1HTkS2 uS0LkSyib1545Gvk05+JAuegbcNrD1y/btyumNddgc8sUTyoojW/iXlYrfmxCKTiwTYT 2DCJkdN9+u1VviZqn83msuq9G6lw/O4f52ffWr2vHIU2bzqbK9yMf9tT/2BevxrW4IFl K9tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=1r+1mqZRVN6OHTqes1getHoGzNPIYfm/PbtxPcaXydU=; b=GBgacUReLhpfAhvnJUkLgevkdGGvj2XA5CC3XrL4XgW84CC+G4yoDTg4QMxH2Bm7Ym lyKm42pAsYnTgehG90fK4azF1f7XnZKyBob38m96kdnde+WouUjstmSS1KB9LQrASx8g +rq6mfrirb4cG61uezHr04+MP8xRa2lYRs4thLGeAj/EbgEE9CWLZlPhwq59Ifw9UxFB SmEoBIi22HNSveRWseJFxndwd9vTna0cjbrvjUioCW8wu6B84iur+j/CoB5NdEHo6oyQ w/DbP/2Dl/sGjNz/bT8bV7qRx9BOZXLz8n97OKtYdxnD9unz24t/pKn4JfGFHGik7vbq vIEg== X-Gm-Message-State: AOAM531VP02k7AVw8WbZ/E6panbB+PV33TC2VSBMJqU6LEyoqiukT1y2 akuHiqyuU+BIybL9ZtolO+dHtPeu8kgt4gjlSaZswa6cE7E= X-Google-Smtp-Source: ABdhPJyy3Hg1Fpa75ghITcoN60CDr2LwO83MlgBatfenbeE26ASlt/arXyoLvbe3atC2iW0zozo3Pyy+Bj16ZooFe40= X-Received: by 2002:ac8:42ce:: with SMTP id g14mr7173167qtm.117.1592047046680; Sat, 13 Jun 2020 04:17:26 -0700 (PDT) MIME-Version: 1.0 References: <20200613105942.GA21613@klumpi.ignorelist.com> In-Reply-To: <20200613105942.GA21613@klumpi.ignorelist.com> From: =?UTF-8?Q?Carl_Winb=C3=A4ck?= Date: Sat, 13 Jun 2020 13:17:15 +0200 Message-ID: Subject: Re: Logging in a web server context To: supervision@list.skarnet.org Content-Type: text/plain; charset="UTF-8" On Sat, 13 Jun 2020 at 12:59, Jan Braun wrote: > I'm not completely sure about s6, but runsv (from runit) hands only the > stdout of the ./run script to the logger, and passes the stderr out of > it's own stderr. This allows you to nest two runsv instances, one for > each output channel: > > [...] > > Translation to s6 is left as an exercise to the reader. Very interesting! I will study this example in depth in order to see if it could be applied to s6. If anyone has done this in s6, I would be interested to hear how you achieved it. > You could also run the webserver with stderr redirected to stdout, and > let s6-log/svlogd filter the messages into one of two logdirs: > > $ printf 'stdout\nstderr\n' | s6-log -- '-.*err' t ./stdout f t ./stderr > $ head std*/current > ==> stderr/current <== > @400000005ee4acd00efdfbe9 stderr > > ==> stdout/current <== > @400000005ee4acd00efd6f5e stdout > > However, that's a brittle solution, because it relies on you creating > correctly-matching filter rules. Depending on the webserver's output, it > might still be feasible, but I recommend the other approach. I agree that this method is not rock-solid since it relies on text parsing. But for my purposes it would probably be sufficient. Then I have at least one solution that should be feasible and possibly both of them are. Thank you Jan!