From patchwork Tue Jul 2 23:29:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1587 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 51C38610C8 for ; Wed, 3 Jul 2019 01:30:21 +0200 (CEST) Received: from pendragon.bb.dnainternet.fi (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EAFBB24B; Wed, 3 Jul 2019 01:30:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1562110221; bh=NF++cVCRGvt6gQwe79Ubj17NCdYRR/Og0rWEvOWRk6c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GxL8llcMyfCK/KFFbZSPAYSu13Xp2PvxAlxqfiBOwYtW+J3A1UE+HZ0jlK6CsvCjN CA9qrAx04CiqcCmjHXSn2CQBL0scipO3aB0+t0sGRPtLA8vIct3aKxdysyiMCDq8Qj B3wEp+SvoJ43L9evG8W3HWk4wF4gT0BCCxsxRgxw= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Wed, 3 Jul 2019 02:29:54 +0300 Message-Id: <20190702232954.27816-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190702232954.27816-1-laurent.pinchart@ideasonboard.com> References: <20190702232954.27816-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] camera: Enable libcamera logging to /var/log/camera X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 23:30:21 -0000 Allow write access to /var/log/camera/ and set the libcamera logging environment variables to configure logging to /var/log/camera/libcamera.log. This requires creating a /var/log/camera/ directory with write access for the arc-camera user. Signed-off-by: Laurent Pinchart --- camera/hal_adapter/init/cros-camera.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/camera/hal_adapter/init/cros-camera.conf b/camera/hal_adapter/init/cros-camera.conf index e73b01da6610..58dd13f0feb8 100644 --- a/camera/hal_adapter/init/cros-camera.conf +++ b/camera/hal_adapter/init/cros-camera.conf @@ -11,6 +11,8 @@ expect fork respawn respawn limit 5 30 +env LIBCAMERA_LOG_FILE=/var/log/camera/libcamera.log +env LIBCAMERA_LOG_LEVELS=0 env SECCOMP_POLICY_FILE=/usr/share/policy/cros-camera.policy env UVC_HWTIMESTAMPS_FILE=/sys/module/uvcvideo/parameters/hwtimestamps env UVC_CLOCK_FILE=/sys/module/uvcvideo/parameters/clock @@ -61,6 +63,7 @@ exec minijail0 -i -u arc-camera -g arc-camera -G \ -k 'tmpfs,/run,tmpfs,MS_NOSUID|MS_NODEV|MS_NOEXEC' \ -b /run/camera,,1 -b /run/systemd/journal -b /run/udev/data \ -b /var/lib/metrics,,1 \ + -b /var/log/camera,,1 \ -R 13,40,40 \ -n -S "${SECCOMP_POLICY_FILE}" \ -- /usr/bin/cros_camera_service