[libcamera-devel] [PATCH] libcamera: keep using syslog logging target also for isolated IPA modules

Jacopo Mondi jacopo.mondi at ideasonboard.com
Wed Mar 1 16:36:55 CET 2023


Hello Matthias

On Mon, Feb 20, 2023 at 08:43:52AM +0100, Matthias Fend via libcamera-devel wrote:
> Currently it is not possible to display debug output from an isolated IPA
> module. The standard  descriptors are all closed and any specified log
> file is explicitly deactivated for the IPA module. Since libcamera and the
> isolated IPA modul are separate processes, they cannot write to the same
> file. However, if syslog is used, then this would be possible.
>
> If syslog is specified as a log file, then this is left as it is for the
> isolated IPA module.
>
> Signed-off-by: Matthias Fend <matthias.fend at emfend.at>

Thanks for all the clarifications
Reviewed-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>
Tested-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>

We'll merge this one soon

> ---
>  src/libcamera/process.cpp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp
> index 0e6b4e1d..86a382fb 100644
> --- a/src/libcamera/process.cpp
> +++ b/src/libcamera/process.cpp
> @@ -263,7 +263,9 @@ int Process::start(const std::string &path,
>
>  		closeAllFdsExcept(fds);
>
> -		unsetenv("LIBCAMERA_LOG_FILE");
> +		const char *file = utils::secure_getenv("LIBCAMERA_LOG_FILE");
> +		if (file && strcmp(file, "syslog"))
> +			unsetenv("LIBCAMERA_LOG_FILE");
>
>  		const char **argv = new const char *[args.size() + 2];
>  		unsigned int len = args.size();
> --
> 2.25.1
>


More information about the libcamera-devel mailing list