[{"id":26464,"web_url":"https://patchwork.libcamera.org/comment/26464/","msgid":"<20230220085007.zrqv6w2aboe4bpiy@uno.localdomain>","date":"2023-02-20T08:50:07","subject":"Re: [libcamera-devel] [PATCH] libcamera: keep using syslog logging\n\ttarget also for isolated IPA modules","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hello Matthias\n\nOn Mon, Feb 20, 2023 at 08:43:52AM +0100, Matthias Fend via libcamera-devel wrote:\n> Currently it is not possible to display debug output from an isolated IPA\n> module. The standard  descriptors are all closed and any specified log\n> file is explicitly deactivated for the IPA module. Since libcamera and the\n> isolated IPA modul are separate processes, they cannot write to the same\n> file. However, if syslog is used, then this would be possible.\n>\n> If syslog is specified as a log file, then this is left as it is for the\n> isolated IPA module.\n>\n\nI'm certainly missing something, but doesn't logging to syslogd\nhappens through the 'syslog()'[1] function call ?\n\n[1] https://linux.die.net/man/3/syslog\n\n> Signed-off-by: Matthias Fend <matthias.fend@emfend.at>\n> ---\n>  src/libcamera/process.cpp | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n>\n> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> index 0e6b4e1d..86a382fb 100644\n> --- a/src/libcamera/process.cpp\n> +++ b/src/libcamera/process.cpp\n> @@ -263,7 +263,9 @@ int Process::start(const std::string &path,\n>\n>  \t\tcloseAllFdsExcept(fds);\n>\n> -\t\tunsetenv(\"LIBCAMERA_LOG_FILE\");\n> +\t\tconst char *file = utils::secure_getenv(\"LIBCAMERA_LOG_FILE\");\n> +\t\tif (file && strcmp(file, \"syslog\"))\n> +\t\t\tunsetenv(\"LIBCAMERA_LOG_FILE\");\n>\n>  \t\tconst char **argv = new const char *[args.size() + 2];\n>  \t\tunsigned int len = args.size();\n> --\n> 2.25.1\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6D561BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Feb 2023 08:50:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9FD2B62606;\n\tMon, 20 Feb 2023 09:50:12 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A9E0761EE5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Feb 2023 09:50:11 +0100 (CET)","from ideasonboard.com (host-95-252-227-22.retail.telecomitalia.it\n\t[95.252.227.22])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 26543A49;\n\tMon, 20 Feb 2023 09:50:11 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1676883012;\n\tbh=S3OfG4/81sjuwegnIhbbsrx4ZWeKzrLKp3qCUbFlNNM=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=R46ExY9L77vV9lWuMAHodzFNhFV+L8h8X7o8z+A5mfIUi/CgU7WMxYQO7Zla9J1o+\n\tFgBXcSw82FYor472utxYDAZ1G6ejswo+JaVnfDpCLw4qQsb4Kp+xevZWRHKfHs4KXe\n\tn+G2YQgYwLHBvkLPv5kZW8quDp7xOIjKl3cc6J50Ib99VPXgFuYf8tfWrrpf4nrvfq\n\tz24K6pTgGibUd8YktrZVeust5jd6devqnrspGh6iaAvoF7zJIU19b0N2CRSsW12Cjm\n\tfPezZLzNkXQ5rtV8RH/7BVXfe9EgtaoMQ66s3FRoERfCrXwDmnu0YSGmjQkMqA/k3h\n\tQB1G1nS2RR1lQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1676883011;\n\tbh=S3OfG4/81sjuwegnIhbbsrx4ZWeKzrLKp3qCUbFlNNM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=C3wf+SzVgodahcjvew+0tgGnzcj626ZDba5WXw05fLU0hmsHKI8iW8jgMJRx6hDfk\n\txyEDiJVSJivIU+XLazuG7ZDKSxSm5fcOKu9eeBC1UFONG+l3arLU1/1KOsraIgUu0A\n\t4ih2+gVLJ6uWh0RmSws+yaxZcvpdo7BMA0jNTs+Y="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"C3wf+SzV\"; dkim-atps=neutral","Date":"Mon, 20 Feb 2023 09:50:07 +0100","To":"Matthias Fend <matthias.fend@emfend.at>","Message-ID":"<20230220085007.zrqv6w2aboe4bpiy@uno.localdomain>","References":"<20230220074352.1221623-1-matthias.fend@emfend.at>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230220074352.1221623-1-matthias.fend@emfend.at>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: keep using syslog logging\n\ttarget also for isolated IPA modules","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26465,"web_url":"https://patchwork.libcamera.org/comment/26465/","msgid":"<ec7834b0-ce51-eed5-039d-f64c0901c3a4@emfend.at>","date":"2023-02-20T09:13:06","subject":"Re: [libcamera-devel] [PATCH] libcamera: keep using syslog logging\n\ttarget also for isolated IPA modules","submitter":{"id":134,"url":"https://patchwork.libcamera.org/api/people/134/","name":"Matthias Fend","email":"matthias.fend@emfend.at"},"content":"Hi Jacopo,\n\nAm 20.02.2023 um 09:50 schrieb Jacopo Mondi:\n> Hello Matthias\n> \n> On Mon, Feb 20, 2023 at 08:43:52AM +0100, Matthias Fend via libcamera-devel wrote:\n>> Currently it is not possible to display debug output from an isolated IPA\n>> module. The standard  descriptors are all closed and any specified log\n>> file is explicitly deactivated for the IPA module. Since libcamera and the\n>> isolated IPA modul are separate processes, they cannot write to the same\n>> file. However, if syslog is used, then this would be possible.\n>>\n>> If syslog is specified as a log file, then this is left as it is for the\n>> isolated IPA module.\n>>\n> \n> I'm certainly missing something, but doesn't logging to syslogd\n> happens through the 'syslog()'[1] function call ?\n\nIf LIBCAMERA_LOG_FILE is set to 'syslog', the logging target is set to \n'LoggingTargetSyslog', which instructs the libcamera logger to use \nsyslog() to output log messages. This is already implemented.\n\nHowever, this environment variable is explicitly deleted for an isolated \nIPA module. This change only prevents this behavior if syslog is to be used.\n\nI don't see any other way to see the debug output of such a module - \napart from adapting the libcamera source code of course.\n\n~Matthias\n\n> \n> [1] https://linux.die.net/man/3/syslog\n> \n>> Signed-off-by: Matthias Fend <matthias.fend@emfend.at>\n>> ---\n>>   src/libcamera/process.cpp | 4 +++-\n>>   1 file changed, 3 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n>> index 0e6b4e1d..86a382fb 100644\n>> --- a/src/libcamera/process.cpp\n>> +++ b/src/libcamera/process.cpp\n>> @@ -263,7 +263,9 @@ int Process::start(const std::string &path,\n>>\n>>   \t\tcloseAllFdsExcept(fds);\n>>\n>> -\t\tunsetenv(\"LIBCAMERA_LOG_FILE\");\n>> +\t\tconst char *file = utils::secure_getenv(\"LIBCAMERA_LOG_FILE\");\n>> +\t\tif (file && strcmp(file, \"syslog\"))\n>> +\t\t\tunsetenv(\"LIBCAMERA_LOG_FILE\");\n>>\n>>   \t\tconst char **argv = new const char *[args.size() + 2];\n>>   \t\tunsigned int len = args.size();\n>> --\n>> 2.25.1\n>>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 661CABDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Feb 2023 09:13:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BEFE062606;\n\tMon, 20 Feb 2023 10:13:11 +0100 (CET)","from lx20.hoststar.hosting (lx20.hoststar.hosting [168.119.41.54])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 01AC961EE5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Feb 2023 10:13:09 +0100 (CET)","from 194-208-208-245.tele.net ([194.208.208.245]:59920\n\thelo=[192.168.0.218])\n\tby lx20.hoststar.hosting with esmtpsa (TLS1.3) tls\n\tTLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.93)\n\t(envelope-from <matthias.fend@emfend.at>)\n\tid 1pU2EO-00311j-Pc; Mon, 20 Feb 2023 10:13:09 +0100"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1676884391;\n\tbh=p+ZPvX+/Yzwi9Kc4hY/TnqXwlokLHFrHpulyK2iftkQ=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=hWIX5Q2Z1lUJGjEXf52rPmSfvtXO7W6WVzuak1A+zd1MLlDdiEfzftlOLVVkkj0Jg\n\t/QDxwWgXOMLuTL94YSMySoUu9GZkUGqSwZ3nH13iQQu/CmbglllQ/XnQAKYaDTh14x\n\tVksLJzSiG0iRa2QOcNDDiqdFVlvlEVanytJCQp8PS4H7HeuJXLYTs0Bw1xG7USpvEh\n\t7OBABQ2LHI5wXEEMRfz16yaHP7hYaVTd1brlKg3V4FSgnC40j+DE1jo3YiBvsIHdzd\n\tht44nDLm1uFeBxs7YCG29mBw+mIkhunMwaNdoPBgdi9ZK0eKvYYIMLxZ9UBniA+bQT\n\tnCj2JOomT0xlQ==","v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=emfend.at;\n\ts=mail;\n\th=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References\n\t:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=bJ8fKdF139ziStLBBb5c7LtwtWspnMhvbJAdhQF4Tk8=;\n\tb=LC77KA5rZTuLRSr7n7pHki+uL4\n\tW/g2wxXhoBAgByY157gQ8+zsQCRTT3pQh3TJdh2c4h3K2d8Fm3I+G9+O23iU8WVJEFYbK6GlFJvX8\n\tu3EpdMcxEVn8PUNid23BPm6L37ksuu8+Upppp46h4oXAJD/e1E0F6qPF4weBR1aIS1mQ=;"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=emfend.at header.i=@emfend.at\n\theader.b=\"LC77KA5r\"; dkim-atps=neutral","Message-ID":"<ec7834b0-ce51-eed5-039d-f64c0901c3a4@emfend.at>","Date":"Mon, 20 Feb 2023 10:13:06 +0100","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64;\n\trv:102.0) Gecko/20100101 Thunderbird/102.8.0","Content-Language":"de-DE","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","References":"<20230220074352.1221623-1-matthias.fend@emfend.at>\n\t<20230220085007.zrqv6w2aboe4bpiy@uno.localdomain>","In-Reply-To":"<20230220085007.zrqv6w2aboe4bpiy@uno.localdomain>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-Spam-Score":"","X-Spam-Bar":"","X-Spam-Report":"","Subject":"Re: [libcamera-devel] [PATCH] libcamera: keep using syslog logging\n\ttarget also for isolated IPA modules","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Matthias Fend via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Matthias Fend <matthias.fend@emfend.at>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26466,"web_url":"https://patchwork.libcamera.org/comment/26466/","msgid":"<20230220100113.gldtyk3apxgzxyya@uno.localdomain>","date":"2023-02-20T10:01:13","subject":"Re: [libcamera-devel] [PATCH] libcamera: keep using syslog logging\n\ttarget also for isolated IPA modules","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hello Matthias\n\nOn Mon, Feb 20, 2023 at 10:13:06AM +0100, Matthias Fend wrote:\n> Hi Jacopo,\n>\n> Am 20.02.2023 um 09:50 schrieb Jacopo Mondi:\n> > Hello Matthias\n> >\n> > On Mon, Feb 20, 2023 at 08:43:52AM +0100, Matthias Fend via libcamera-devel wrote:\n> > > Currently it is not possible to display debug output from an isolated IPA\n> > > module. The standard  descriptors are all closed and any specified log\n> > > file is explicitly deactivated for the IPA module. Since libcamera and the\n> > > isolated IPA modul are separate processes, they cannot write to the same\n> > > file. However, if syslog is used, then this would be possible.\n> > >\n> > > If syslog is specified as a log file, then this is left as it is for the\n> > > isolated IPA module.\n> > >\n> >\n> > I'm certainly missing something, but doesn't logging to syslogd\n> > happens through the 'syslog()'[1] function call ?\n>\n> If LIBCAMERA_LOG_FILE is set to 'syslog', the logging target is set to\n> 'LoggingTargetSyslog', which instructs the libcamera logger to use syslog()\n> to output log messages. This is already implemented.\n\nUps, I completely missed that\n\n>\n> However, this environment variable is explicitly deleted for an isolated IPA\n> module. This change only prevents this behavior if syslog is to be used.\n>\n> I don't see any other way to see the debug output of such a module - apart\n> from adapting the libcamera source code of course.\n>\n\nOk then, this now makes sense to me.\n\nI don't see issues in allowing isolated processes interface to syslog,\nbut let's wait for other's opinions.\n\n> ~Matthias\n>\n> >\n> > [1] https://linux.die.net/man/3/syslog\n> >\n> > > Signed-off-by: Matthias Fend <matthias.fend@emfend.at>\n> > > ---\n> > >   src/libcamera/process.cpp | 4 +++-\n> > >   1 file changed, 3 insertions(+), 1 deletion(-)\n> > >\n> > > diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> > > index 0e6b4e1d..86a382fb 100644\n> > > --- a/src/libcamera/process.cpp\n> > > +++ b/src/libcamera/process.cpp\n> > > @@ -263,7 +263,9 @@ int Process::start(const std::string &path,\n> > >\n> > >   \t\tcloseAllFdsExcept(fds);\n> > >\n> > > -\t\tunsetenv(\"LIBCAMERA_LOG_FILE\");\n> > > +\t\tconst char *file = utils::secure_getenv(\"LIBCAMERA_LOG_FILE\");\n> > > +\t\tif (file && strcmp(file, \"syslog\"))\n> > > +\t\t\tunsetenv(\"LIBCAMERA_LOG_FILE\");\n\nIndentation seems off though\n\n> > >\n> > >   \t\tconst char **argv = new const char *[args.size() + 2];\n> > >   \t\tunsigned int len = args.size();\n> > > --\n> > > 2.25.1\n> > >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6E23DBE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Feb 2023 10:01:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D3C4961EE5;\n\tMon, 20 Feb 2023 11:01:16 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DA7B261EE5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Feb 2023 11:01:15 +0100 (CET)","from ideasonboard.com (host-95-252-227-22.retail.telecomitalia.it\n\t[95.252.227.22])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 32FEFA49;\n\tMon, 20 Feb 2023 11:01:15 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1676887276;\n\tbh=pg5I/Kwf3Qv+0ZXcqEXd6Zidud1kYxYDuY8T+bqXDWw=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=3rhwiEBtOjEbTcAz++yXlPWOX9nKzE049k3a0uRQNHrl8lpAyFgKfnKA/21nKLeKx\n\tea4V858hYghIDcp9FZRdsyw7zI2WMYCP1k8uW8cQ9IiqbB6UAs88hGPKMDWP+rrg6y\n\tacW4lqGifDA1t0UHeC2kHcbwG/Fr+90UAf3Nkp0/8vagON+jsBxcKQLp2MN2ShAGvJ\n\tJULoBF3Bg90ArkVE/ShjPdOFPaAAyriiugkTsfS5CmfwEcqinNg631ofDe3tkXEEf4\n\tBFnU+dif+kgHL//VPuMIWUHPfUJS/tdrMSoWEjBv4iqC/0gp/MRm0mEE8e1Cz5c0V1\n\thKpfC12iGHtSQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1676887275;\n\tbh=pg5I/Kwf3Qv+0ZXcqEXd6Zidud1kYxYDuY8T+bqXDWw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=h/8UJjN4/W4CjjqsjxPVHd+K34EgDGBkDBBhOGtmFbJqaDxCgZSgpwO+7GE1h/Ejb\n\triuZUMVV81UpB5UK4iHSkxMl16XIKfsHtNvclquhiProN2t0615Xd+sx9S0dIpTs+M\n\tYcImLJCLRF587hCoRtLIjkoQUtp1raDxhawOr/d4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"h/8UJjN4\"; dkim-atps=neutral","Date":"Mon, 20 Feb 2023 11:01:13 +0100","To":"Matthias Fend <matthias.fend@emfend.at>","Message-ID":"<20230220100113.gldtyk3apxgzxyya@uno.localdomain>","References":"<20230220074352.1221623-1-matthias.fend@emfend.at>\n\t<20230220085007.zrqv6w2aboe4bpiy@uno.localdomain>\n\t<ec7834b0-ce51-eed5-039d-f64c0901c3a4@emfend.at>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<ec7834b0-ce51-eed5-039d-f64c0901c3a4@emfend.at>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: keep using syslog logging\n\ttarget also for isolated IPA modules","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26472,"web_url":"https://patchwork.libcamera.org/comment/26472/","msgid":"<662a7798-71d5-0f37-8ec0-38b91e08a162@emfend.at>","date":"2023-02-24T11:01:33","subject":"Re: [libcamera-devel] [PATCH] libcamera: keep using syslog logging\n\ttarget also for isolated IPA modules","submitter":{"id":134,"url":"https://patchwork.libcamera.org/api/people/134/","name":"Matthias Fend","email":"matthias.fend@emfend.at"},"content":"Hi Jacopo,\n\nAm 20.02.2023 um 11:01 schrieb Jacopo Mondi:\n> Hello Matthias\n> \n> On Mon, Feb 20, 2023 at 10:13:06AM +0100, Matthias Fend wrote:\n>> Hi Jacopo,\n>>\n>> Am 20.02.2023 um 09:50 schrieb Jacopo Mondi:\n>>> Hello Matthias\n>>>\n>>> On Mon, Feb 20, 2023 at 08:43:52AM +0100, Matthias Fend via libcamera-devel wrote:\n>>>> Currently it is not possible to display debug output from an isolated IPA\n>>>> module. The standard  descriptors are all closed and any specified log\n>>>> file is explicitly deactivated for the IPA module. Since libcamera and the\n>>>> isolated IPA modul are separate processes, they cannot write to the same\n>>>> file. However, if syslog is used, then this would be possible.\n>>>>\n>>>> If syslog is specified as a log file, then this is left as it is for the\n>>>> isolated IPA module.\n>>>>\n>>>\n>>> I'm certainly missing something, but doesn't logging to syslogd\n>>> happens through the 'syslog()'[1] function call ?\n>>\n>> If LIBCAMERA_LOG_FILE is set to 'syslog', the logging target is set to\n>> 'LoggingTargetSyslog', which instructs the libcamera logger to use syslog()\n>> to output log messages. This is already implemented.\n> \n> Ups, I completely missed that\n> \n>>\n>> However, this environment variable is explicitly deleted for an isolated IPA\n>> module. This change only prevents this behavior if syslog is to be used.\n>>\n>> I don't see any other way to see the debug output of such a module - apart\n>> from adapting the libcamera source code of course.\n>>\n> \n> Ok then, this now makes sense to me.\n> \n> I don't see issues in allowing isolated processes interface to syslog,\n> but let's wait for other's opinions.\n> \n>> ~Matthias\n>>\n>>>\n>>> [1] https://linux.die.net/man/3/syslog\n>>>\n>>>> Signed-off-by: Matthias Fend <matthias.fend@emfend.at>\n>>>> ---\n>>>>    src/libcamera/process.cpp | 4 +++-\n>>>>    1 file changed, 3 insertions(+), 1 deletion(-)\n>>>>\n>>>> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n>>>> index 0e6b4e1d..86a382fb 100644\n>>>> --- a/src/libcamera/process.cpp\n>>>> +++ b/src/libcamera/process.cpp\n>>>> @@ -263,7 +263,9 @@ int Process::start(const std::string &path,\n>>>>\n>>>>    \t\tcloseAllFdsExcept(fds);\n>>>>\n>>>> -\t\tunsetenv(\"LIBCAMERA_LOG_FILE\");\n>>>> +\t\tconst char *file = utils::secure_getenv(\"LIBCAMERA_LOG_FILE\");\n>>>> +\t\tif (file && strcmp(file, \"syslog\"))\n>>>> +\t\t\tunsetenv(\"LIBCAMERA_LOG_FILE\");\n> \n> Indentation seems off though\n\nUnfortunately, I do not see the problem. Can you please tell me more \nprecisely what does not fit?\n\nThanks\n  ~Matthias\n\n> \n>>>>\n>>>>    \t\tconst char **argv = new const char *[args.size() + 2];\n>>>>    \t\tunsigned int len = args.size();\n>>>> --\n>>>> 2.25.1\n>>>>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 7884FBE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Feb 2023 11:01:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2E12562652;\n\tFri, 24 Feb 2023 12:01:38 +0100 (CET)","from lx20.hoststar.hosting (lx20.hoststar.hosting [168.119.41.54])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 330D762646\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Feb 2023 12:01:36 +0100 (CET)","from 194-208-208-245.tele.net ([194.208.208.245]:57333\n\thelo=[192.168.0.218])\n\tby lx20.hoststar.hosting with esmtpsa (TLS1.3) tls\n\tTLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.93)\n\t(envelope-from <matthias.fend@emfend.at>)\n\tid 1pVVpW-0081no-RL; Fri, 24 Feb 2023 12:01:35 +0100"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1677236498;\n\tbh=xW9baRHGvOw1YV49tJXnEQ9Izn1U9NlW7/qJXPxiOJk=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=kSrHsctywaMKOsjtEpiXfWIvJBJwUWaC8OUNkGB/JDU15Qu+PYSfNyPIfnzc870Wu\n\t0VyN2zpSsL46wrOAcBdaKff5EwilCmdsQubjM4KqH/W5uSwDKB1O+ctXRT39dO+QJA\n\t9FtrApnoJ7iWJGxXcIzgt+Ec8EaTrCiBWF4TrzAiL6w9YJfIKedXoZNyx0bAHCRG2q\n\tTUGTnnsmFqn4F6qVxW9Qpn8FVNvzdOjSroixBiv2KG22tjOLruUhLOy6cB7VrRKJLc\n\tIIw1uIuB2cPNRJKQIwFqMjsfpFHruvoong+QX9hoxQDwfkPoeciKcamk7yjCsz/FUT\n\tJz4YA8hBv6Y0w==","v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=emfend.at;\n\ts=mail;\n\th=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References\n\t:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=y0YzA8pxiwlsu1gbQVvBH7yAcTh5lwX3Zh0c2Ni5MoY=;\n\tb=LsidK06rqZryQRIzkAETf5IJg0\n\tcqjGCARUX7m+3lYHujIJGAh9GEzFKvTqWlLKB1IGOs2Cb612+fR3yeGEDEVrmBN1zsUcxNqTYMq96\n\tLfT5KGfxTI+E2IfTtK/L8yPrrc6q/DCJlj+vUVEOE7pb5U6YvsjrSTTNpMqrfzrFxvGY=;"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=emfend.at header.i=@emfend.at\n\theader.b=\"LsidK06r\"; dkim-atps=neutral","Message-ID":"<662a7798-71d5-0f37-8ec0-38b91e08a162@emfend.at>","Date":"Fri, 24 Feb 2023 12:01:33 +0100","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64;\n\trv:102.0) Gecko/20100101 Thunderbird/102.8.0","Content-Language":"de-DE","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","References":"<20230220074352.1221623-1-matthias.fend@emfend.at>\n\t<20230220085007.zrqv6w2aboe4bpiy@uno.localdomain>\n\t<ec7834b0-ce51-eed5-039d-f64c0901c3a4@emfend.at>\n\t<20230220100113.gldtyk3apxgzxyya@uno.localdomain>","In-Reply-To":"<20230220100113.gldtyk3apxgzxyya@uno.localdomain>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-Spam-Score":"","X-Spam-Bar":"","X-Spam-Report":"","Subject":"Re: [libcamera-devel] [PATCH] libcamera: keep using syslog logging\n\ttarget also for isolated IPA modules","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Matthias Fend via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Matthias Fend <matthias.fend@emfend.at>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26478,"web_url":"https://patchwork.libcamera.org/comment/26478/","msgid":"<20230224124642.jmwclkeontzjee2z@uno.localdomain>","date":"2023-02-24T12:46:42","subject":"Re: [libcamera-devel] [PATCH] libcamera: keep using syslog logging\n\ttarget also for isolated IPA modules","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Matthias\n\nOn Fri, Feb 24, 2023 at 12:01:33PM +0100, Matthias Fend via libcamera-devel wrote:\n> Hi Jacopo,\n>\n> Am 20.02.2023 um 11:01 schrieb Jacopo Mondi:\n> > Hello Matthias\n> >\n> > On Mon, Feb 20, 2023 at 10:13:06AM +0100, Matthias Fend wrote:\n> > > Hi Jacopo,\n> > >\n> > > Am 20.02.2023 um 09:50 schrieb Jacopo Mondi:\n> > > > Hello Matthias\n> > > >\n> > > > On Mon, Feb 20, 2023 at 08:43:52AM +0100, Matthias Fend via libcamera-devel wrote:\n> > > > > Currently it is not possible to display debug output from an isolated IPA\n> > > > > module. The standard  descriptors are all closed and any specified log\n> > > > > file is explicitly deactivated for the IPA module. Since libcamera and the\n> > > > > isolated IPA modul are separate processes, they cannot write to the same\n> > > > > file. However, if syslog is used, then this would be possible.\n> > > > >\n> > > > > If syslog is specified as a log file, then this is left as it is for the\n> > > > > isolated IPA module.\n> > > > >\n> > > >\n> > > > I'm certainly missing something, but doesn't logging to syslogd\n> > > > happens through the 'syslog()'[1] function call ?\n> > >\n> > > If LIBCAMERA_LOG_FILE is set to 'syslog', the logging target is set to\n> > > 'LoggingTargetSyslog', which instructs the libcamera logger to use syslog()\n> > > to output log messages. This is already implemented.\n> >\n> > Ups, I completely missed that\n> >\n> > >\n> > > However, this environment variable is explicitly deleted for an isolated IPA\n> > > module. This change only prevents this behavior if syslog is to be used.\n> > >\n> > > I don't see any other way to see the debug output of such a module - apart\n> > > from adapting the libcamera source code of course.\n> > >\n> >\n> > Ok then, this now makes sense to me.\n> >\n> > I don't see issues in allowing isolated processes interface to syslog,\n> > but let's wait for other's opinions.\n> >\n> > > ~Matthias\n> > >\n> > > >\n> > > > [1] https://linux.die.net/man/3/syslog\n> > > >\n> > > > > Signed-off-by: Matthias Fend <matthias.fend@emfend.at>\n> > > > > ---\n> > > > >    src/libcamera/process.cpp | 4 +++-\n> > > > >    1 file changed, 3 insertions(+), 1 deletion(-)\n> > > > >\n> > > > > diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> > > > > index 0e6b4e1d..86a382fb 100644\n> > > > > --- a/src/libcamera/process.cpp\n> > > > > +++ b/src/libcamera/process.cpp\n> > > > > @@ -263,7 +263,9 @@ int Process::start(const std::string &path,\n> > > > >\n> > > > >    \t\tcloseAllFdsExcept(fds);\n> > > > >\n> > > > > -\t\tunsetenv(\"LIBCAMERA_LOG_FILE\");\n> > > > > +\t\tconst char *file = utils::secure_getenv(\"LIBCAMERA_LOG_FILE\");\n> > > > > +\t\tif (file && strcmp(file, \"syslog\"))\n> > > > > +\t\t\tunsetenv(\"LIBCAMERA_LOG_FILE\");\n> >\n> > Indentation seems off though\n>\n> Unfortunately, I do not see the problem. Can you please tell me more\n> precisely what does not fit?\n>\n\nI'm sorry don't know what happened but in my client it was shown with\na single indendentation tab :/\n\nSorry for the noise\n\n> Thanks\n>  ~Matthias\n>\n> >\n> > > > >\n> > > > >    \t\tconst char **argv = new const char *[args.size() + 2];\n> > > > >    \t\tunsigned int len = args.size();\n> > > > > --\n> > > > > 2.25.1\n> > > > >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 46879BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Feb 2023 12:46:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 86F1E62668;\n\tFri, 24 Feb 2023 13:46:47 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4F28A62646\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Feb 2023 13:46:46 +0100 (CET)","from ideasonboard.com (host-87-16-53-160.retail.telecomitalia.it\n\t[87.16.53.160])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7E7322E4;\n\tFri, 24 Feb 2023 13:46:45 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1677242807;\n\tbh=H7VBBMg94W+MOYQOEs43FpqrLbWR35GvwjI//TApnew=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=JyGCSyhuXa6EFAKjRcbTNUWAnj+4bu/5adMT5gshBr8c854fNCXwUM7zLpv89Fe+0\n\tV6KvkZQ16AUPDzVl/ov0rcfZtbDCE5MT3+jfXDNkVb9FvKcO8qD71UTZlFABODtrky\n\tcSZdz0Das5KqzsIOl6GnUem8Wg4AwRiRI18eay0S6uJdDRgT+N9p/3WFud6aaNCYO0\n\t4n/R3sK2hYiBTIkC6vcOqS7S5qFJ2XnrqE+n3+uYXMtMW0vbFkU43Pe0T72E+vgO9M\n\tuuQBZtr6BlZrMOsLfL/MSV51ZqtTcLMUk3o28N4to6lthZS0adtCLGyj+Va1ejjZ4s\n\t8BAHePIJOJzmw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1677242805;\n\tbh=H7VBBMg94W+MOYQOEs43FpqrLbWR35GvwjI//TApnew=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=N0BSbwhIelwOq98fCTb1IGVLmlXhHtJ8c6xVOtYOVkVVU1g4j0GJcQhbtj/qwhpB5\n\ttp2sKDU7OrG/Jcop1xknMZcZFxRe1dTQ1uYLOIF8Jdl4AWIlBVuFmLMrwEyTU5a9li\n\tRFuy6rd4O1kqLNU+aq6+yp7NOp2S0IkrRR2z1zD0="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"N0BSbwhI\"; dkim-atps=neutral","Date":"Fri, 24 Feb 2023 13:46:42 +0100","To":"Matthias Fend <matthias.fend@emfend.at>","Message-ID":"<20230224124642.jmwclkeontzjee2z@uno.localdomain>","References":"<20230220074352.1221623-1-matthias.fend@emfend.at>\n\t<20230220085007.zrqv6w2aboe4bpiy@uno.localdomain>\n\t<ec7834b0-ce51-eed5-039d-f64c0901c3a4@emfend.at>\n\t<20230220100113.gldtyk3apxgzxyya@uno.localdomain>\n\t<662a7798-71d5-0f37-8ec0-38b91e08a162@emfend.at>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<662a7798-71d5-0f37-8ec0-38b91e08a162@emfend.at>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: keep using syslog logging\n\ttarget also for isolated IPA modules","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26506,"web_url":"https://patchwork.libcamera.org/comment/26506/","msgid":"<167763059888.93391.7252441096675649630@Monstersaurus>","date":"2023-03-01T00:29:58","subject":"Re: [libcamera-devel] [PATCH] libcamera: keep using syslog logging\n\ttarget also for isolated IPA modules","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Matthias Fend via libcamera-devel (2023-02-20 07:43:52)\n> Currently it is not possible to display debug output from an isolated IPA\n> module. The standard  descriptors are all closed and any specified log\n> file is explicitly deactivated for the IPA module. Since libcamera and the\n> isolated IPA modul are separate processes, they cannot write to the same\n> file. However, if syslog is used, then this would be possible.\n> \n> If syslog is specified as a log file, then this is left as it is for the\n> isolated IPA module.\n> \n\nThis seems reasonable to me.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: Matthias Fend <matthias.fend@emfend.at>\n> ---\n>  src/libcamera/process.cpp | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> index 0e6b4e1d..86a382fb 100644\n> --- a/src/libcamera/process.cpp\n> +++ b/src/libcamera/process.cpp\n> @@ -263,7 +263,9 @@ int Process::start(const std::string &path,\n>  \n>                 closeAllFdsExcept(fds);\n>  \n> -               unsetenv(\"LIBCAMERA_LOG_FILE\");\n> +               const char *file = utils::secure_getenv(\"LIBCAMERA_LOG_FILE\");\n> +               if (file && strcmp(file, \"syslog\"))\n> +                       unsetenv(\"LIBCAMERA_LOG_FILE\");\n>  \n>                 const char **argv = new const char *[args.size() + 2];\n>                 unsigned int len = args.size();\n> -- \n> 2.25.1\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id A6233BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  1 Mar 2023 00:30:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D374E626AB;\n\tWed,  1 Mar 2023 01:30:02 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D32DF62691\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  1 Mar 2023 01:30:01 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 54A89890;\n\tWed,  1 Mar 2023 01:30:01 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1677630602;\n\tbh=503FwefKztUZAEEMTCp/zrLdPxRbl3znSoSusjA5t1E=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=qjD1jqsc5HtTMsoQf5r5sQRO1++KoMeoB8nNWziLluf39r5k5rk45s3hHmq/zMwuA\n\tnNcDXe56OtdfAVdojQzRezsvnRWi+dg0RQDx9ihml+VFsSYFpc9xEfvJovVuGNWV+i\n\t7fzjdFEji0Bn8/sHaZyQGKUd/nA8ph98jdASE7k9pxOc50nTRz1QXmQ7GmhWEQViJY\n\tqa4bpD+7f+F1mmMLhGJA/iiYKGyTkBhXi+wkG1swWQRbreyG+D4dm50eJW/aA452Pf\n\tvLsCLZyV6J4z0kurWVU2H0759m1KWUjoRXIyFKYPyKrpZp3x2HM8lBnJ6FzS4Rt8xF\n\tHKKR+fl9CqwQQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1677630601;\n\tbh=503FwefKztUZAEEMTCp/zrLdPxRbl3znSoSusjA5t1E=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=hIyHchbyPX1oPYa2y87yUsvxAzKUwA4mZyiYaewA4eAW/8UugwkmQldrVjXU3loEN\n\trxXksij8xmV4hM6kPQC3RU7pQdbpOUxRcUGG8CX36CPs6CuaVZ5uyYX2dAMsCPpimc\n\tUCGafW42EoXog6XdKimRfFC2lPzn1AZUrZ3gmm5Y="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"hIyHchby\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20230220074352.1221623-1-matthias.fend@emfend.at>","References":"<20230220074352.1221623-1-matthias.fend@emfend.at>","To":"Matthias Fend <matthias.fend@emfend.at>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Wed, 01 Mar 2023 00:29:58 +0000","Message-ID":"<167763059888.93391.7252441096675649630@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] libcamera: keep using syslog logging\n\ttarget also for isolated IPA modules","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26519,"web_url":"https://patchwork.libcamera.org/comment/26519/","msgid":"<20230301153655.ul7nmzy3oawaed3m@uno.localdomain>","date":"2023-03-01T15:36:55","subject":"Re: [libcamera-devel] [PATCH] libcamera: keep using syslog logging\n\ttarget also for isolated IPA modules","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hello Matthias\n\nOn Mon, Feb 20, 2023 at 08:43:52AM +0100, Matthias Fend via libcamera-devel wrote:\n> Currently it is not possible to display debug output from an isolated IPA\n> module. The standard  descriptors are all closed and any specified log\n> file is explicitly deactivated for the IPA module. Since libcamera and the\n> isolated IPA modul are separate processes, they cannot write to the same\n> file. However, if syslog is used, then this would be possible.\n>\n> If syslog is specified as a log file, then this is left as it is for the\n> isolated IPA module.\n>\n> Signed-off-by: Matthias Fend <matthias.fend@emfend.at>\n\nThanks for all the clarifications\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nTested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nWe'll merge this one soon\n\n> ---\n>  src/libcamera/process.cpp | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n>\n> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> index 0e6b4e1d..86a382fb 100644\n> --- a/src/libcamera/process.cpp\n> +++ b/src/libcamera/process.cpp\n> @@ -263,7 +263,9 @@ int Process::start(const std::string &path,\n>\n>  \t\tcloseAllFdsExcept(fds);\n>\n> -\t\tunsetenv(\"LIBCAMERA_LOG_FILE\");\n> +\t\tconst char *file = utils::secure_getenv(\"LIBCAMERA_LOG_FILE\");\n> +\t\tif (file && strcmp(file, \"syslog\"))\n> +\t\t\tunsetenv(\"LIBCAMERA_LOG_FILE\");\n>\n>  \t\tconst char **argv = new const char *[args.size() + 2];\n>  \t\tunsigned int len = args.size();\n> --\n> 2.25.1\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id EED03BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  1 Mar 2023 15:37:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 724B362698;\n\tWed,  1 Mar 2023 16:37:00 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C8EE162665\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  1 Mar 2023 16:36:58 +0100 (CET)","from ideasonboard.com (host-87-18-61-24.retail.telecomitalia.it\n\t[87.18.61.24])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5E28F890;\n\tWed,  1 Mar 2023 16:36:58 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1677685020;\n\tbh=2XOwP5dua98KQB+5EtmMRVLYqwg8H8BztgBpQO/8xo0=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=Hf9A7jkUxFvwfbNvY1cKRw7oSZSi94s6rSgloJlDLeLGx3r+nzFGXynhBHiupGrQL\n\ti/+7OtEY+W7sfd2/dzydIPi6v+HxIjEpLQe9P+FDavKDzHxF18SuOOqSsGiOsfjcu0\n\t6OXLBqfHXIzcgoOHjm1BgspsvfQpt/cgdC65hHOh18T1VEBhBrbShbZeCjdj2+0q2R\n\tr2kYP4mLl/dSUKa6mUf9on2BaE2fQmPGrcAdi9OYk7dtRcGiPvxNOvfF3AbIEOx3bj\n\tTfobsajtfIwRleGkoQzDewPN/AbQhvx1zZv5MXv/1h1LTchR3qXYi0RlJZcWd6IhoB\n\tq8bUYCiamjq6A==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1677685018;\n\tbh=2XOwP5dua98KQB+5EtmMRVLYqwg8H8BztgBpQO/8xo0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=jS+J7yNdD7Cfj6IFo2T56NpLCjN6mayjFfdXH7NBQeik/YAjlSFYzcqNgDAtDnYA+\n\tHdnX0Fd1qnG4oB3t6f8TBIQ5Vj+V6RFdvB3YGTfvzjslFhpEwsEaOUkDRx+xW0Cc1l\n\tI6BNgWtVEJtaC0W3/2Zc9TPfqQ2jfjNNO979fd1A="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"jS+J7yNd\"; dkim-atps=neutral","Date":"Wed, 1 Mar 2023 16:36:55 +0100","To":"Matthias Fend <matthias.fend@emfend.at>","Message-ID":"<20230301153655.ul7nmzy3oawaed3m@uno.localdomain>","References":"<20230220074352.1221623-1-matthias.fend@emfend.at>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230220074352.1221623-1-matthias.fend@emfend.at>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: keep using syslog logging\n\ttarget also for isolated IPA modules","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]