From patchwork Wed May 25 22:25:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16045 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 8AC0CC3256 for ; Wed, 25 May 2022 22:25:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B7FFD6566C; Thu, 26 May 2022 00:25:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1653517516; bh=PoqoB8GftOOmh7JVMbF/JdLM/JKTkM537VnYpQ2xOhI=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=cx9COkJn/fXljPwwhIq1kgfzjSzg+X1PXezMWEKMz8kUUsC2uHJyvKar0ixWVgBYd uc7N1mPrAjiR/+60XsakoNcZpg5CxZadsNBlvU7qB/0hvMcpdEDvK4Sq8ANB5Faq8s 0BpSRTrKCd/JULmX3bLQFOpyMnhbFPMgZHq1ZADmemcEEGVyzw3KU/BIE2gAdw2ghN GSv8349gfzzeUjPgK/kSvZRr7QjsNQ4EHKaMV2e18XyiK+34W1LDheAiUe1Kh11phL LOIZvbpOf3imZuZbqj9vY65vILpa0WTcxcvZA0n7P0RoJf84VXrHse9ydBpGL5HrUj iCQbJNHasQ1Wg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8CBFD60422 for ; Thu, 26 May 2022 00:25:12 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="YB5Va64/"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (ip-109-40-242-63.web.vodafone.de [109.40.242.63]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 17BF7BB3; Thu, 26 May 2022 00:25:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1653517512; bh=PoqoB8GftOOmh7JVMbF/JdLM/JKTkM537VnYpQ2xOhI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YB5Va64/h0kR1sD3ydLkCHb9yflLBOOFTB9BMbNIyJmt6Hy115mHrx7wrQ0ZxMUxz ULtZEmrpE51HvGtUywvOxJjMxMqFMpqa8bfiIlKoKiQmjl5qhaZ4BMUErCv4wF+Smx uVpMeACUhBTwyzvjO5yNQ/An/wiAIX1+Zx0ZQTd4= To: libcamera-devel@lists.libcamera.org Date: Thu, 26 May 2022 01:25:00 +0300 Message-Id: <20220525222503.6460-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220525222503.6460-1-laurent.pinchart@ideasonboard.com> References: <20220525222503.6460-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/5] libcamera: base: log: Replace stderr with std::cerr in documentation 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: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" While std::cerr and stderr both target the same file by default, this may be overridden by applications. Update the documentation to use std::cerr instead of stderr to be accurate. Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain Reviewed-by: Paul Elder --- src/libcamera/base/log.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libcamera/base/log.cpp b/src/libcamera/base/log.cpp index df84ba4e8328..9ae62368a54d 100644 --- a/src/libcamera/base/log.cpp +++ b/src/libcamera/base/log.cpp @@ -46,11 +46,11 @@ * their category are output to the log, while other messages are silently * discarded. * - * By default log messages are output to stderr. They can be redirected to a log - * file by setting the LIBCAMERA_LOG_FILE environment variable to the name of - * the file. The file must be writable and is truncated if it exists. If any + * By default log messages are output to std::cerr. They can be redirected to a + * log file by setting the LIBCAMERA_LOG_FILE environment variable to the name + * of the file. The file must be writable and is truncated if it exists. If any * error occurs when opening the file, the file is ignored and the log is output - * to stderr. + * to std::cerr. */ /** @@ -527,7 +527,8 @@ Logger::Logger() * If the LIBCAMERA_LOG_FILE environment variable is set, open the file it * points to and redirect the logger output to it. If the environment variable * is set to "syslog", then the logger output will be directed to syslog. Errors - * are silently ignored and don't affect the logger output (set to stderr). + * are silently ignored and don't affect the logger output (set to std::cerr by + * default). */ void Logger::parseLogFile() {