{"id":22873,"url":"https://patchwork.libcamera.org/api/patches/22873/?format=json","web_url":"https://patchwork.libcamera.org/patch/22873/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20250225173531.2595922-4-pobrn@protonmail.com>","date":"2025-02-25T17:35:53","name":"[v4,3/8] libcamera: base: log: Remove `LogMessage::init()`","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"018a9c7ec8125b7d1172dd0f3a6183e354af46d7","submitter":{"id":133,"url":"https://patchwork.libcamera.org/api/people/133/?format=json","name":"Pőcze Barnabás","email":"pobrn@protonmail.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/22873/mbox/","series":[{"id":5022,"url":"https://patchwork.libcamera.org/api/series/5022/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5022","date":"2025-02-25T17:35:34","name":"libcamera: base: log: Misc. changes","version":4,"mbox":"https://patchwork.libcamera.org/series/5022/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/22873/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/22873/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6AD55BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 Feb 2025 17:35:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 198956872E;\n\tTue, 25 Feb 2025 18:35:59 +0100 (CET)","from mail-40134.protonmail.ch (mail-40134.protonmail.ch\n\t[185.70.40.134])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6138E6872E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Feb 2025 18:35:57 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"S0w79wyZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1740504956; x=1740764156;\n\tbh=IwldtIui0rLycRdEk/44+P4fn37khm4u5+th8XSb2r4=;\n\th=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:\n\tFeedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:\n\tMessage-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post;\n\tb=S0w79wyZATSE+1/nHb28oTwuHZ4JvmYtggyNhZbU64gJ5TsZhUwlc3YOxZXy4THqp\n\txosF71nsq9CMVvLwueftxDqCArOLBkWGMqDr3xTRyELFCX/8I64wc3/lEu7n/ZDh93\n\tBR34Xj+ETLWgtI5YZmGU/2p2TkwPkvZ109yVKEFVZkSk4RD9ah8HJpGCp6roO20Nck\n\tqqcVyXvrQRuQaYwD80TD8kNfq6PhYIEG02A9oDOtYyCaWouAj5AjX4mW1Ihvtj0kB9\n\tT21D4DBUiW8FU7ZwydjeKuCfMNps0Eo7q2WS7TkB6Mq4ONUxUQT/T3kaemAZFMbcCD\n\tdp/T7JrF+m2AA==","Date":"Tue, 25 Feb 2025 17:35:53 +0000","To":"libcamera-devel@lists.libcamera.org","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"[PATCH v4 3/8] libcamera: base: log: Remove `LogMessage::init()`","Message-ID":"<20250225173531.2595922-4-pobrn@protonmail.com>","In-Reply-To":"<20250225173531.2595922-1-pobrn@protonmail.com>","References":"<20250225173531.2595922-1-pobrn@protonmail.com>","Feedback-ID":"20568564:user:proton","X-Pm-Message-ID":"e552bf9c3a6f822c524f8e6efb7c1f98b92fd69a","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"It is a short function that can be merged into the constructor with\nessentially no change in observable behaviour, so do that.\n\nSigned-off-by: Barnabás Pőcze <pobrn@protonmail.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/base/log.h |  2 --\n src/libcamera/base/log.cpp   | 16 ++++------------\n 2 files changed, 4 insertions(+), 14 deletions(-)","diff":"diff --git a/include/libcamera/base/log.h b/include/libcamera/base/log.h\nindex b3050eedb..6d2c93019 100644\n--- a/include/libcamera/base/log.h\n+++ b/include/libcamera/base/log.h\n@@ -75,8 +75,6 @@ public:\n private:\n \tLIBCAMERA_DISABLE_COPY_AND_MOVE(LogMessage)\n \n-\tvoid init(const char *fileName, unsigned int line);\n-\n \tstd::ostringstream msgStream_;\n \tconst LogCategory &category_;\n \tLogSeverity severity_;\ndiff --git a/src/libcamera/base/log.cpp b/src/libcamera/base/log.cpp\nindex 42514de97..a43ed9684 100644\n--- a/src/libcamera/base/log.cpp\n+++ b/src/libcamera/base/log.cpp\n@@ -861,19 +861,11 @@ const LogCategory &LogCategory::defaultCategory()\n LogMessage::LogMessage(const char *fileName, unsigned int line,\n \t\t       const LogCategory &category, LogSeverity severity,\n \t\t       const std::string &prefix)\n-\t: category_(category), severity_(severity), prefix_(prefix)\n+\t: category_(category), severity_(severity),\n+\t  timestamp_(utils::clock::now()),\n+\t  fileInfo_((std::ostringstream() << utils::basename(fileName) << \":\" << line).str()),\n+\t  prefix_(prefix)\n {\n-\tinit(fileName, line);\n-}\n-\n-void LogMessage::init(const char *fileName, unsigned int line)\n-{\n-\t/* Log the timestamp, severity and file information. */\n-\ttimestamp_ = utils::clock::now();\n-\n-\tstd::ostringstream ossFileInfo;\n-\tossFileInfo << utils::basename(fileName) << \":\" << line;\n-\tfileInfo_ = ossFileInfo.str();\n }\n \n LogMessage::~LogMessage()\n","prefixes":["v4","3/8"]}