Patch Detail
Show a patch.
GET /api/patches/166/?format=api
{ "id": 166, "url": "https://patchwork.libcamera.org/api/patches/166/?format=api", "web_url": "https://patchwork.libcamera.org/patch/166/", "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": "<20190107231151.23291-4-laurent.pinchart@ideasonboard.com>", "date": "2019-01-07T23:11:43", "name": "[libcamera-devel,v2,03/11] libcamera: log: Pad timestamp fields with zeros", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "253bea12ff66c9d5eaa0553706f726cff09529e3", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/166/mbox/", "series": [ { "id": 56, "url": "https://patchwork.libcamera.org/api/series/56/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=56", "date": "2019-01-07T23:11:40", "name": "libcamera: Add event notification and timers", "version": 2, "mbox": "https://patchwork.libcamera.org/series/56/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/166/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/166/checks/", "tags": {}, "headers": { "Return-Path": "<laurent.pinchart@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 843C4600CC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 8 Jan 2019 00:10:48 +0100 (CET)", "from avalon.bb.dnainternet.fi\n\t(dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 087E4530\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 8 Jan 2019 00:10:47 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1546902648;\n\tbh=rNX/4JQBdYqjmk8vMJqf81o78lM0u93vAU04+tVxWiE=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=EFHq87tgplne4TllGU7NQHZMCxpf+CQgoktUhgGLCtMSG5TLt2JO5LJlMS8ONQWBL\n\tgtnBBPCKRPiamPBqnP/ov4IOPB7nlGMTaST25iU9bxhvXzPvdxkVb6GqbUdnI7XoL4\n\txMmp00Ib9Oj0BNMQSNW/8GGqmvamzlyi9XXnQnlg=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 8 Jan 2019 01:11:43 +0200", "Message-Id": "<20190107231151.23291-4-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.19.2", "In-Reply-To": "<20190107231151.23291-1-laurent.pinchart@ideasonboard.com>", "References": "<20190107231151.23291-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 03/11] libcamera: log: Pad timestamp\n\tfields with zeros", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.23", "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": "Mon, 07 Jan 2019 23:10:48 -0000" }, "content": "The logger prints the timestamp fields with a fixed width, but pads them\nwith spaces instead of zeros. Fix this.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/libcamera/log.cpp | 2 ++\n 1 file changed, 2 insertions(+)", "diff": "diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp\nindex 6785d371449e..c1ec55618ea3 100644\n--- a/src/libcamera/log.cpp\n+++ b/src/libcamera/log.cpp\n@@ -101,10 +101,12 @@ LogMessage::LogMessage(const char *fileName, unsigned int line,\n \t/* Log the timestamp, severity and file information. */\n \tstruct timespec timestamp;\n \tclock_gettime(CLOCK_MONOTONIC, ×tamp);\n+\tmsgStream.fill('0');\n \tmsgStream << \"[\" << timestamp.tv_sec / (60 * 60) << \":\"\n \t\t << std::setw(2) << (timestamp.tv_sec / 60) % 60 << \":\"\n \t\t << std::setw(2) << timestamp.tv_sec % 60 << \".\"\n \t\t << std::setw(9) << timestamp.tv_nsec << \"]\";\n+\tmsgStream.fill(' ');\n \n \tmsgStream << \" \" << log_severity_name(severity);\n \tmsgStream << \" \" << basename(fileName) << \":\" << line << \" \";\n", "prefixes": [ "libcamera-devel", "v2", "03/11" ] }