[libcamera-devel] Log output of isolated IPA module

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Nov 8 22:30:34 CET 2022


Hi Matthias,

On Tue, Nov 08, 2022 at 08:54:04PM +0100, Matthias Fend via libcamera-devel wrote:
> Hi everyone
> 
> When searching for the reason for missing log outputs from an isolated 
> running IPA module, I found that this is done explicitly by calling 
> unsetenv("LIBCAMERA_LOG_FILE") and closing all fds.
> 
> So I was wondering what the reason for this is and what the intended way 
> is to enable log information in such a case (without modifying the source)?

As isolated IPA modules run in a different process, they can't log to
the same file as the main libcamera process without causing corruption.
The proxy worker that runs the IPA module has the following code (in
utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl):

{#- \todo Handle enabling debugging more dynamically. #}
        /* Uncomment this for debugging. */
#if 0
        std::string logPath = "/tmp/libcamera.worker." +
                              std::to_string(getpid()) + ".log";
        logSetFile(logPath.c_str());
#endif

This is thus a known issue, which we haven't addressed yet. I haven't
really taken the time myself to figure out what a good mechanism would
be.

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list