Show a patch.

GET /api/patches/16046/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 16046,
    "url": "https://patchwork.libcamera.org/api/patches/16046/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16046/",
    "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": "<20220525222503.6460-4-laurent.pinchart@ideasonboard.com>",
    "date": "2022-05-25T22:25:01",
    "name": "[libcamera-devel,3/5] libcamera: base: log: Log to std::cerr if log file can't be opened",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "b7e0d4d4b4a0e71d413dfc73de960cd9c22e85d9",
    "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/16046/mbox/",
    "series": [
        {
            "id": 3140,
            "url": "https://patchwork.libcamera.org/api/series/3140/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3140",
            "date": "2022-05-25T22:24:58",
            "name": "libcamera: Add colors to the log",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3140/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16046/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16046/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 BEEADC326D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 25 May 2022 22:25:18 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C5E0465663;\n\tThu, 26 May 2022 00:25:17 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1683B60422\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 May 2022 00:25:13 +0200 (CEST)",
            "from pendragon.ideasonboard.com (ip-109-40-242-63.web.vodafone.de\n\t[109.40.242.63])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 96473D80;\n\tThu, 26 May 2022 00:25:12 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1653517517;\n\tbh=BnBM4ZHYsqKV4XZBmPL+ckPipLUUlQcsT4unuHQEajY=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=eRv37vVQA4iDoNRkiifAaPUcjjM00Q140mfoIqfsn/sRTizYpHFi39FOLxM673CDN\n\tJKNke38qcUWc5qt0/F6gjtswrAtMatw2JWmrcZy5mSsu+mt/BjI1hEJHw8rR1bqBf2\n\tA650sbjDVUBzdWof+caucwC+eSCJpe4SHgkO9WIdSl5rP1Fb04QexjFuMLJP7SXtaQ\n\tkCY3lrL2gIycA6gxWT1JiRZTtdjBZzc7XKx1SSxGJO66BIS/nVaZ8lfTLDHaB//bIQ\n\trD9wj6lJoAO21O9NlHc8WWgd8qvmJnQGSdP4klMXMqsQGvATUx+BacgPQRK4XZSywk\n\tQzYUyTPju72hg==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1653517512;\n\tbh=BnBM4ZHYsqKV4XZBmPL+ckPipLUUlQcsT4unuHQEajY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=B8ietL3XnfLtYpBggndBf/GHfbeVizxjENYwsfvjAbdN3sFcuBzVTadgcJ/cx8x8U\n\t2CJtjspmsnfi/92IXa1PBOhwlFx/cVbREHZmy3GonNEs8TE2QJcg1P7P7oce34molm\n\ttmHEjEUCepb87t+hh0Pi/2C7+S1WAosBoL5OJcnY="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"B8ietL3X\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 26 May 2022 01:25:01 +0300",
        "Message-Id": "<20220525222503.6460-4-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",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 3/5] libcamera: base: log: Log to\n\tstd::cerr if log file can't be opened",
        "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>",
        "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "If the log file specified through LIBCAMERA_LOG_FILE can't be opened,\nlogging is currently completely disabled. This doesn't match the\ndocumented behaviour that tells std::cerr is used instead. Fix it to\nmatch the documentation.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/base/log.cpp | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/libcamera/base/log.cpp b/src/libcamera/base/log.cpp\nindex 9ae62368a54d..26f1420703b9 100644\n--- a/src/libcamera/base/log.cpp\n+++ b/src/libcamera/base/log.cpp\n@@ -517,6 +517,8 @@ void Logger::logSetLevel(const char *category, const char *level)\n  */\n Logger::Logger()\n {\n+\tlogSetStream(&std::cerr);\n+\n \tparseLogFile();\n \tparseLogLevels();\n }\n@@ -533,10 +535,8 @@ Logger::Logger()\n void Logger::parseLogFile()\n {\n \tconst char *file = utils::secure_getenv(\"LIBCAMERA_LOG_FILE\");\n-\tif (!file) {\n-\t\tlogSetStream(&std::cerr);\n+\tif (!file)\n \t\treturn;\n-\t}\n \n \tif (!strcmp(file, \"syslog\")) {\n \t\tlogSetTarget(LoggingTargetSyslog);\n",
    "prefixes": [
        "libcamera-devel",
        "3/5"
    ]
}