Patch Detail
Show a patch.
GET /api/1.1/patches/152/?format=api
{ "id": 152, "url": "https://patchwork.libcamera.org/api/1.1/patches/152/?format=api", "web_url": "https://patchwork.libcamera.org/patch/152/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20190106023328.10989-3-laurent.pinchart@ideasonboard.com>", "date": "2019-01-06T02:33:20", "name": "[libcamera-devel,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/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/152/mbox/", "series": [ { "id": 53, "url": "https://patchwork.libcamera.org/api/1.1/series/53/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=53", "date": "2019-01-06T02:33:18", "name": "[libcamera-devel,01/11] libcamera: log: Add a LogFatal log level", "version": 1, "mbox": "https://patchwork.libcamera.org/series/53/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/152/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/152/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 85BFB60B2E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 6 Jan 2019 03:32:27 +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 245BF513\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 6 Jan 2019 03:32:27 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1546741947;\n\tbh=5d6i/BBznSoao+qquiwR3emq5p6mlKKhj4zQUtQJEos=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=dpYM/rCEhScUm9Gahh1TW85ujyIYv27Hb3yG0HJ1rW9xdinBa/cx4w1uvgmlUFNql\n\tp4Wf0JhFDQupvZ2MkYVhRKvUdOxE6b4VpN9QFb8L2OLhvvhLP/tW4bSlnULukNkYhr\n\tUXYtNx7XaI8hGTP8JJ2GN4+qgWKtMQ2bFxO9RM9Q=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sun, 6 Jan 2019 04:33:20 +0200", "Message-Id": "<20190106023328.10989-3-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.19.2", "In-Reply-To": "<20190106023328.10989-1-laurent.pinchart@ideasonboard.com>", "References": "<20190106023328.10989-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 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": "Sun, 06 Jan 2019 02:32:27 -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>\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 4165cbd654fc..e4d07fbbea3b 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", "03/11" ] }