Patch Detail
Show a patch.
GET /api/patches/2643/?format=api
{ "id": 2643, "url": "https://patchwork.libcamera.org/api/patches/2643/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2643/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20200114014728.29981-1-kieran.bingham@ideasonboard.com>", "date": "2020-01-14T01:47:28", "name": "[libcamera-devel,v2] libcamera: log: Expand log level names", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "fac6eac8a1a016a055c17b1fdfa0c42d3acc64ac", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2643/mbox/", "series": [ { "id": 622, "url": "https://patchwork.libcamera.org/api/series/622/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=622", "date": "2020-01-14T01:47:28", "name": "[libcamera-devel,v2] libcamera: log: Expand log level names", "version": 2, "mbox": "https://patchwork.libcamera.org/series/622/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2643/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2643/checks/", "tags": {}, "headers": { "Return-Path": "<kieran.bingham@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D2DFA6070F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Jan 2020 02:47:33 +0100 (CET)", "from localhost.localdomain\n\t(cpc108967-cmbg20-2-0-cust420.5-4.cable.virginm.net [81.101.7.165])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 29163563;\n\tTue, 14 Jan 2020 02:47:33 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1578966453;\n\tbh=PQJncj14NlsJbVD51KcHYkNvZ5o00Og62GgFlXX7u+M=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=sNfcs0IPt0O8E+Yd61wTMxrqGbCl+0g1XrgST2oVcaGc/aCzMeA6lLqpDM5Qhznq+\n\trS80uhnltpeif/Nfo/H2Yl3tSkI3bk7oylKv7ugPaKpzbKJlGSgamyXWOMQV8d7OyU\n\tnOSbYfjDyE28qk9cvY0b+4yF+R4WilgNEGd7+Fv0=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "LibCamera Devel <libcamera-devel@lists.libcamera.org>", "Date": "Tue, 14 Jan 2020 01:47:28 +0000", "Message-Id": "<20200114014728.29981-1-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2] libcamera: log: Expand log level names", "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>", "X-List-Received-Date": "Tue, 14 Jan 2020 01:47:34 -0000" }, "content": "When the log severity names were added, there was only 4 characters\nreserved for their printing. When the FATAL level was added, this\nincreased to 5, and thus both DBG and ERR can be expanded to their full\nspelling. This also brings the levels in line with the representation\nthat can be used when calling logSetLevel().\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\nv2:\n - Expand commit message\n - Expand spacing before the log severity name is printed.\n\n src/libcamera/log.cpp | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp\nindex f4eb8c11adc3..7d59f411f5d7 100644\n--- a/src/libcamera/log.cpp\n+++ b/src/libcamera/log.cpp\n@@ -83,10 +83,10 @@ static int log_severity_to_syslog(LogSeverity severity)\n static const char *log_severity_name(LogSeverity severity)\n {\n \tstatic const char *const names[] = {\n-\t\t\" DBG\",\n+\t\t\"DEBUG\",\n \t\t\" INFO\",\n \t\t\" WARN\",\n-\t\t\" ERR\",\n+\t\t\"ERROR\",\n \t\t\"FATAL\",\n \t};\n \n@@ -196,7 +196,7 @@ void LogOutput::write(const LogMessage &msg)\n \t\tbreak;\n \tcase LoggingTargetStream:\n \tcase LoggingTargetFile:\n-\t\tstr = \"[\" + utils::time_point_to_string(msg.timestamp()) + \"]\"\n+\t\tstr = \"[\" + utils::time_point_to_string(msg.timestamp()) + \"] \"\n \t\t + log_severity_name(msg.severity()) + \" \"\n \t\t + msg.category().name() + \" \" + msg.fileInfo() + \" \"\n \t\t + msg.msg();\n", "prefixes": [ "libcamera-devel", "v2" ] }