get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 129317,
    "url": "http://patchwork.dpdk.org/api/patches/129317/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230705224805.286156-5-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230705224805.286156-5-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230705224805.286156-5-stephen@networkplumber.org",
    "date": "2023-07-05T22:48:04",
    "name": "[v7,4/5] eal: allow user to set default log stream before init",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "042a3c78b665c03ff2711749db00e361518bbe05",
    "submitter": {
        "id": 27,
        "url": "http://patchwork.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230705224805.286156-5-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 28845,
            "url": "http://patchwork.dpdk.org/api/series/28845/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28845",
            "date": "2023-07-05T22:48:00",
            "name": "Logging timetamp and related patches",
            "version": 7,
            "mbox": "http://patchwork.dpdk.org/series/28845/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/129317/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/129317/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 96A6242DDE;\n\tThu,  6 Jul 2023 00:48:34 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8EB4E42D61;\n\tThu,  6 Jul 2023 00:48:16 +0200 (CEST)",
            "from mail-pj1-f49.google.com (mail-pj1-f49.google.com\n [209.85.216.49]) by mails.dpdk.org (Postfix) with ESMTP id E252042D5A\n for <dev@dpdk.org>; Thu,  6 Jul 2023 00:48:13 +0200 (CEST)",
            "by mail-pj1-f49.google.com with SMTP id\n 98e67ed59e1d1-262e3c597b9so133272a91.0\n for <dev@dpdk.org>; Wed, 05 Jul 2023 15:48:13 -0700 (PDT)",
            "from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218])\n by smtp.gmail.com with ESMTPSA id\n bb16-20020a17090b009000b002630bfd35b0sm1906044pjb.7.2023.07.05.15.48.11\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 05 Jul 2023 15:48:12 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1688597293;\n x=1691189293;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=tu64yanKVd/U/fBF/GuU00+xQ7H4v2dyUbNhKOpsKv0=;\n b=2sSn+bI+aTKE1RKQinc1Rb4B+XushAbPGSJ15OpLpzVhGDJvG5pbiVmKl6/+q2UzXk\n 5BZvOrQuQ9usl9+vOIJ7/sxD6CzjLijK+ac0jqmcGYMLe6O3bEmBnFVJc7VBeVl4VimU\n UasBu5GoMXbiWk7/UDTBojHn6mozH2+UlsYSQWWuAfB2bNNhPYC4XgoL2ZfuroqS/vIC\n b9TAXt6RtcdyOv3m2GGB0DmIVqdarUzldzjwWIzIiw7KBimFJtxoRn/dbn6y8ti3hFr8\n xmnNPHj+bTkI5aR++J7UV0UM6XQy6GdxrBIotrmpym06eQb6TVvUwRNDFTfVHcklUcQq\n IdoQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20221208; t=1688597293; x=1691189293;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=tu64yanKVd/U/fBF/GuU00+xQ7H4v2dyUbNhKOpsKv0=;\n b=VycgAkxAGksnDRkiIN2xJ7JaFWFgBshz+rqeZ/N33tZb8BQsRVk+dIJGFPsKIHmvXs\n lXGDkt2sXInMl1pE6qh1rxT6b1qiyRZKfBuTdijbTFaiGNhBeiaZPUY8RqLJ4R8LSRmR\n QBQKOle05OJLwvka5QvSgU4763oyjji0bTcqeu8r/h1PydfyMZgEnuqdfVu77xyoS2O6\n Wat4VqUetOmihF+GfXQ5pj01zlNhGRX55BDC2TP3vLJkRAO/5zn8LiBFXom/gUptEOMk\n 0gor3ju/+86Rg2g3R8CkTaxhox6dLfXsLrbZ7C8yCddCNnO4XVWaZHFxDzsDe5L+LG82\n oA5Q==",
        "X-Gm-Message-State": "ABy/qLZ7A1LFccml/Wv6JpG1X33CuFJePQZ9tjNvfYjm42iO29yvdmTU\n 3uITKiO27IrUlfMxWVtBvDhxqyvJqcEuJrY4o3Y=",
        "X-Google-Smtp-Source": "\n APBJJlGZiDJYF+L7r+KzjTZIj01D1Gh+sR3kfxr6o5g/MMnI3MMiiW+9E1Zdr/5sjYCT6+3UC5n+Aw==",
        "X-Received": "by 2002:a17:90a:ac0d:b0:261:38ca:3c48 with SMTP id\n o13-20020a17090aac0d00b0026138ca3c48mr150843pjq.11.1688597292798;\n Wed, 05 Jul 2023 15:48:12 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Reshma Pattan <reshma.pattan@intel.com>,\n Maryam Tahhan <maryam.tahhan@intel.com>",
        "Subject": "[PATCH v7 4/5] eal: allow user to set default log stream before init",
        "Date": "Wed,  5 Jul 2023 15:48:04 -0700",
        "Message-Id": "<20230705224805.286156-5-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20230705224805.286156-1-stephen@networkplumber.org>",
        "References": "<20200814173441.23086-1-stephen@networkplumber.org>\n <20230705224805.286156-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "It is useful for application to be able to set the default log\nstream before call rte_eal_init(). This makes all messages go\nto the new default.\n\nFor example, to skip using syslog; just doing\n\trte_openlog_stream(stderr);\n\nThere is no reason for helper command line applications to clutter\nsyslog with messages.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n app/dumpcap/main.c              | 3 +++\n app/pdump/main.c                | 3 +++\n app/proc-info/main.c            | 3 +++\n lib/eal/common/eal_common_log.c | 6 ++++++\n lib/eal/common/eal_log.h        | 1 +\n lib/eal/unix/eal_log.c          | 4 ++++\n 6 files changed, 20 insertions(+)",
    "diff": "diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c\nindex 64294bbfb3e6..bf31eef13cf4 100644\n--- a/app/dumpcap/main.c\n+++ b/app/dumpcap/main.c\n@@ -639,6 +639,9 @@ static void dpdk_init(void)\n \t\teal_argv[i++] = strdup(file_prefix);\n \t}\n \n+\t/* keep any logging away from syslog. */\n+\trte_openlog_stream(stderr);\n+\n \tif (rte_eal_init(eal_argc, eal_argv) < 0)\n \t\trte_exit(EXIT_FAILURE, \"EAL init failed: is primary process running?\\n\");\n }\ndiff --git a/app/pdump/main.c b/app/pdump/main.c\nindex c94606275b28..82c67350e4ab 100644\n--- a/app/pdump/main.c\n+++ b/app/pdump/main.c\n@@ -989,6 +989,9 @@ main(int argc, char **argv)\n \n \targc += 2;\n \n+\t/* keep any logging away from syslog. */\n+\trte_openlog_stream(stderr);\n+\n \tdiag = rte_eal_init(argc, argp);\n \tif (diag < 0)\n \t\trte_panic(\"Cannot init EAL\\n\");\ndiff --git a/app/proc-info/main.c b/app/proc-info/main.c\nindex 53e852a07c14..371b1f382d66 100644\n--- a/app/proc-info/main.c\n+++ b/app/proc-info/main.c\n@@ -1774,6 +1774,9 @@ main(int argc, char **argv)\n \n \targc += 4;\n \n+\t/* keep any logging away from syslog. */\n+\trte_openlog_stream(stderr);\n+\n \tret = rte_eal_init(argc, argp);\n \tif (ret < 0)\n \t\trte_panic(\"Cannot init EAL\\n\");\ndiff --git a/lib/eal/common/eal_common_log.c b/lib/eal/common/eal_common_log.c\nindex 1b2080e8ef04..1533ee871f47 100644\n--- a/lib/eal/common/eal_common_log.c\n+++ b/lib/eal/common/eal_common_log.c\n@@ -584,6 +584,12 @@ eal_log_set_default(FILE *default_log)\n #endif\n }\n \n+FILE *\n+eal_log_get_default(void)\n+{\n+\treturn default_log_stream;\n+}\n+\n /*\n  * Called by eal_cleanup\n  */\ndiff --git a/lib/eal/common/eal_log.h b/lib/eal/common/eal_log.h\nindex 31dc489350f6..268c2a264382 100644\n--- a/lib/eal/common/eal_log.h\n+++ b/lib/eal/common/eal_log.h\n@@ -22,6 +22,7 @@ int eal_log_level_parse(int argc, char * const argv[]);\n  * Determine where log data is written when no call to rte_openlog_stream.\n  */\n void eal_log_set_default(FILE *default_log);\n+FILE *eal_log_get_default(void);\n \n /*\n  * Save a log option for later.\ndiff --git a/lib/eal/unix/eal_log.c b/lib/eal/unix/eal_log.c\nindex 85d817c2d31e..e66bcc68d07f 100644\n--- a/lib/eal/unix/eal_log.c\n+++ b/lib/eal/unix/eal_log.c\n@@ -60,6 +60,10 @@ eal_log_init(const char *id, int facility)\n {\n \tFILE *log_stream;\n \n+\t/* has user has already setup a log stream */\n+\tif (eal_log_get_default())\n+\t\treturn 0;\n+\n \tlog_stream = fopencookie(NULL, \"w+\", console_log_func);\n \tif (log_stream == NULL)\n \t\treturn -1;\n",
    "prefixes": [
        "v7",
        "4/5"
    ]
}