From patchwork Wed Feb 26 00:55:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22880 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 62B88BF415 for ; Wed, 26 Feb 2025 00:56:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2C8ED68742; Wed, 26 Feb 2025 01:56:08 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="b5V7Lu66"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7003C6873D for ; Wed, 26 Feb 2025 01:56:06 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E7178502 for ; Wed, 26 Feb 2025 01:54:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740531279; bh=93UENvXEyRue1fMzbKh0vjmn/GSQ8F7SPrh3LW8lIYY=; h=From:To:Subject:Date:From; b=b5V7Lu66aBePTHVpZmVXz7wFlQqqz6Fe8IkhsPY8MhIBoyWR4bOGfKDQz8tFRQH4a TIdldlxLJcF1Mfv5Yp6bhq11sBkGcKVDZVAUzchazi0NF2SBqXr0m04eG2xcYrqTEG xaJWOXl+xztP41amdAivQGAV9Yb7NKFXbtEIVKjk= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH] libcamera: camera: Log info message to report camera creation Date: Wed, 26 Feb 2025 02:55:47 +0200 Message-ID: <20250226005547.30237-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Camera creation is one of the most important events generated by libcamera, but we are completely silent about it. The lack of a log message makes it more difficult to identify problems and provide support. Fix it by adding an Info message that reports the camera id and its pipeline handler when the camera is created. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Tested-by: Adam Pigg Reviewed-by: Kieran Bingham --- src/libcamera/camera.cpp | 4 ++++ 1 file changed, 4 insertions(+) base-commit: 33ce463a46c44f874fdbc3e484bee730e7b251a3 -- Regards, Laurent Pinchart diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 56c5851993c9..35097bfdafa2 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -862,6 +862,10 @@ std::shared_ptr Camera::create(std::unique_ptr d, } }; + LOG(Camera, Info) + << "Creating camera '" << id << "' for pipeline handler " + << d->pipe_->name(); + Camera *camera = new Camera(std::move(d), id, streams); return std::shared_ptr(camera, Deleter());