libcamera: ipa_module: Add log prefix

Make the IPAModule class inherit from Loggable to log the IPA module
name in all messages.

Before:

[14:19:55.743795676] [20250] ERROR IPAModule ipa_module.cpp:279 IPA module is not an ELF file

After:

[14:20:22.343795887] [20270] ERROR IPAModule ipa_module.cpp:279 ipa_vimc.so: IPA module is not an ELF file

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart
2020-04-29 03:26:48 +03:00
parent bf01e04f29
commit bcf986d07b
2 changed files with 10 additions and 1 deletions

View File

@@ -471,4 +471,9 @@ bool IPAModule::match(PipelineHandler *pipe,
!strcmp(info_.pipelineName, pipe->name());
}
std::string IPAModule::logPrefix() const
{
return utils::basename(libPath_.c_str());
}
} /* namespace libcamera */