get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 139009,
    "url": "http://patches.dpdk.org/api/patches/139009/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240330164433.50144-14-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "http://patches.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": "<20240330164433.50144-14-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240330164433.50144-14-stephen@networkplumber.org",
    "date": "2024-03-30T16:42:24",
    "name": "[v20,13/14] log: add support for systemd journal",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "6b17d4a1d2b37a150e5ac54d823c09e8fe79626f",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240330164433.50144-14-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 31649,
            "url": "http://patches.dpdk.org/api/series/31649/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31649",
            "date": "2024-03-30T16:42:11",
            "name": "Logging unification and improvements",
            "version": 20,
            "mbox": "http://patches.dpdk.org/series/31649/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/139009/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/139009/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 A05A643D85;\n\tSat, 30 Mar 2024 17:46:19 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B4F35410FD;\n\tSat, 30 Mar 2024 17:45:06 +0100 (CET)",
            "from mail-oo1-f52.google.com (mail-oo1-f52.google.com\n [209.85.161.52]) by mails.dpdk.org (Postfix) with ESMTP id 6447440685\n for <dev@dpdk.org>; Sat, 30 Mar 2024 17:44:55 +0100 (CET)",
            "by mail-oo1-f52.google.com with SMTP id\n 006d021491bc7-5a4817189c8so1869123eaf.1\n for <dev@dpdk.org>; Sat, 30 Mar 2024 09:44:55 -0700 (PDT)",
            "from hermes.local (204-195-123-203.wavecable.com. [204.195.123.203])\n by smtp.gmail.com with ESMTPSA id\n by1-20020a056a02058100b005dc26144d96sm4192417pgb.75.2024.03.30.09.44.53\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 30 Mar 2024 09:44:54 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1711817095;\n x=1712421895; darn=dpdk.org;\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=qnJoWRHGkmu0fB4v4JIaAm7TBXfGnR77iGxZMj9UVUc=;\n b=cO3c4HmfU0rfLYTtjNnS7nQdAl/J03iPz3kNPQ+LLNnprmbIAmYqUfG+1pm89pxT3/\n l78F2u7s2SUnU4Ncmkp0nTWzHOeFodyBFlRFBXoJqpt/KOQ533XaG655S7K6uTA504B8\n gKj2GylXqQ2uLlV7cr9c5MSXLcPHevZ+MX3s1mCrZlNnlj2+qJXk30QkllMU2SCvaFvS\n IkWwBjmYYIzcL4Y+yCW31lKs8isCvwksx05KgJNgd2sOhbQK76A/o9iYESzXZQik7iFc\n a6+xEHskIIzsfQVzkiS14fD/e9V4aSgqymeAOZaEKNtLW/dwWSTum1v5FUv9uxi+lmdI\n b+XQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1711817095; x=1712421895;\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=qnJoWRHGkmu0fB4v4JIaAm7TBXfGnR77iGxZMj9UVUc=;\n b=jta18by1gxNU2b/sQzmIR8W4zCD2/0zqHM3f9WF/tSwO3rXAYFKlmvAdohEXrytxiK\n hTa5jdew854pe8IU/GsJGFLXkMh+cKoX/Tf5C0pvsnCberioRSnqfPDJeGr5I/2cSXjf\n XkQ0EInnNcyWqBeaJL1Efr7U0EfQjeteZYA2bYW+x3YGnBbaQSHVE1b4maYorgu6BqAF\n WDbTlhPH9PHZCXy6pj45IE6y+XaCN6+Of47EEwmuHUp/MDa+vl8jKRBDzT14rOVDBD5k\n aUF/36iL2CC9S5cnyqhHPTqvoyaEEUoW2+0eeprJcjH5Z0Tc6rxIo4pYVGkPeqRgo/E3\n ZYhA==",
        "X-Gm-Message-State": "AOJu0YwFV6mLn0s/GaTaFsDiIFbmEMUgRZj8m2VT8jJEcQ+f25JhSWyw\n 8nVC3dwud171RkKGlevDExdrGNQcbCjsg/hHFUqOKyn/hMCGpISN7KOstld7YVSEpwlWLABS5zq\n E",
        "X-Google-Smtp-Source": "\n AGHT+IGYYr+FAcruLjnPoMZ4gSlssLWOwAg2TZgRGl4b/tWi428azppx/QUMllsEp2VmZoYgm6Pvtw==",
        "X-Received": "by 2002:a05:6358:9211:b0:17b:f03e:2bfa with SMTP id\n d17-20020a056358921100b0017bf03e2bfamr6429406rwb.21.1711817094657;\n Sat, 30 Mar 2024 09:44:54 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Subject": "[PATCH v20 13/14] log: add support for systemd journal",
        "Date": "Sat, 30 Mar 2024 09:42:24 -0700",
        "Message-ID": "<20240330164433.50144-14-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20240330164433.50144-1-stephen@networkplumber.org>",
        "References": "<20200814173441.23086-1-stephen@networkplumber.org>\n <20240330164433.50144-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": "If DPDK application is being run as a systemd service, then\nit can use the journal protocol which allows putting more information\nin the log such as priority and other information.\n\nThe use of journal protocol is automatically detected and\nhandled.  Rather than having a dependency on libsystemd,\njust use the protocol directly as defined in:\n\thttps://systemd.io/JOURNAL_NATIVE_PROTOCOL/\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n doc/guides/prog_guide/log_lib.rst   |  14 ++\n lib/eal/common/eal_common_options.c |  11 ++\n lib/eal/common/eal_options.h        |   2 +\n lib/log/log.c                       |   5 +\n lib/log/log_internal.h              |   3 +\n lib/log/log_journal.c               | 200 ++++++++++++++++++++++++++++\n lib/log/log_private.h               |   2 +\n lib/log/log_stubs.c                 |  11 +-\n lib/log/meson.build                 |  10 +-\n lib/log/version.map                 |   1 +\n 10 files changed, 255 insertions(+), 4 deletions(-)\n create mode 100644 lib/log/log_journal.c",
    "diff": "diff --git a/doc/guides/prog_guide/log_lib.rst b/doc/guides/prog_guide/log_lib.rst\nindex abaedc7212..476dedb097 100644\n--- a/doc/guides/prog_guide/log_lib.rst\n+++ b/doc/guides/prog_guide/log_lib.rst\n@@ -100,6 +100,20 @@ option. There are three possible settings for this option:\n \n If ``--syslog`` option is not specified, then only console (stderr) will be used.\n \n+Messages can be redirected to systemd journal which is an enhanced version of syslog with the ``--log-journal`` option.\n+\n+There are three possible settings for this option:\n+\n+*auto*\n+    If stderr is redirected to journal by ``systemd`` service\n+    then use journal socket to instead of stderr for log.\n+    This is the default.\n+\n+*never*\n+    Do not try to use journal.\n+\n+*always*\n+    Always try to direct messages to journal socket.\n \n \n Using Logging APIs to Generate Log Messages\ndiff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c\nindex 9ca7db04aa..9a82118184 100644\n--- a/lib/eal/common/eal_common_options.c\n+++ b/lib/eal/common/eal_common_options.c\n@@ -74,6 +74,7 @@ eal_long_options[] = {\n \t{OPT_IOVA_MODE,\t        1, NULL, OPT_IOVA_MODE_NUM        },\n \t{OPT_LCORES,            1, NULL, OPT_LCORES_NUM           },\n \t{OPT_LOG_LEVEL,         1, NULL, OPT_LOG_LEVEL_NUM        },\n+\t{OPT_LOG_JOURNAL,\t2, NULL, OPT_LOG_JOURNAL_NUM\t  },\n \t{OPT_LOG_TIMESTAMP,     2, NULL, OPT_LOG_TIMESTAMP_NUM    },\n \t{OPT_TRACE,             1, NULL, OPT_TRACE_NUM            },\n \t{OPT_TRACE_DIR,         1, NULL, OPT_TRACE_DIR_NUM        },\n@@ -1617,6 +1618,7 @@ eal_log_level_parse(int argc, char * const argv[])\n \t\tswitch (opt) {\n \t\tcase OPT_LOG_LEVEL_NUM:\n \t\tcase OPT_SYSLOG_NUM:\n+\t\tcase OPT_LOG_JOURNAL_NUM:\n \t\tcase OPT_LOG_TIMESTAMP_NUM:\n \t\t\tif (eal_parse_common_option(opt, optarg, internal_conf) < 0)\n \t\t\t\treturn -1;\n@@ -1843,6 +1845,14 @@ eal_parse_common_option(int opt, const char *optarg,\n \t\t\treturn -1;\n \t\t}\n \t\tbreak;\n+\n+\tcase OPT_LOG_JOURNAL_NUM:\n+\t\tif (eal_log_journal(optarg) < 0) {\n+\t\t\tEAL_LOG(ERR, \"invalid parameters for --\"\n+\t\t\t\tOPT_LOG_JOURNAL);\n+\t\t\treturn -1;\n+\t\t}\n+\t\tbreak;\n #endif\n \n \tcase OPT_LOG_LEVEL_NUM:\n@@ -2223,6 +2233,7 @@ eal_common_usage(void)\n \t       \"  --\"OPT_PROC_TYPE\"         Type of this process (primary|secondary|auto)\\n\"\n #ifndef RTE_EXEC_ENV_WINDOWS\n \t       \"  --\"OPT_SYSLOG\"[=<when>]   Enable use of syslog\\n\"\n+\t       \"  --\"OPT_LOG_JOURNAL\"[=<when>]  Enable use of systemd journal\\n\"\n #endif\n \t       \"  --\"OPT_LOG_LEVEL\"=<level> Set global log level\\n\"\n \t       \"  --\"OPT_LOG_LEVEL\"=<type-match>:<level>\\n\"\ndiff --git a/lib/eal/common/eal_options.h b/lib/eal/common/eal_options.h\nindex e24c9eca53..c5a1c70288 100644\n--- a/lib/eal/common/eal_options.h\n+++ b/lib/eal/common/eal_options.h\n@@ -35,6 +35,8 @@ enum {\n \tOPT_LCORES_NUM,\n #define OPT_LOG_LEVEL         \"log-level\"\n \tOPT_LOG_LEVEL_NUM,\n+#define OPT_LOG_JOURNAL       \"log-journal\"\n+\tOPT_LOG_JOURNAL_NUM,\n #define OPT_LOG_TIMESTAMP     \"log-timestamp\"\n \tOPT_LOG_TIMESTAMP_NUM,\n #define OPT_TRACE             \"trace\"\ndiff --git a/lib/log/log.c b/lib/log/log.c\nindex 4430b251a1..13d68402d9 100644\n--- a/lib/log/log.c\n+++ b/lib/log/log.c\n@@ -508,6 +508,11 @@ eal_log_init(const char *id)\n #else\n \tbool is_terminal = isatty(STDERR_FILENO);\n \n+#ifdef RTE_EXEC_ENV_LINUX\n+\tif (log_journal_enabled())\n+\t\tlog_journal_open(id);\n+\telse\n+#endif\n \tif (log_syslog_enabled(is_terminal))\n \t\tlog_syslog_open(id, is_terminal);\n \telse\ndiff --git a/lib/log/log_internal.h b/lib/log/log_internal.h\nindex 7c7d44eed2..82fdc21ac2 100644\n--- a/lib/log/log_internal.h\n+++ b/lib/log/log_internal.h\n@@ -29,6 +29,9 @@ int eal_log_save_pattern(const char *pattern, uint32_t level);\n __rte_internal\n int eal_log_syslog(const char *name);\n \n+__rte_internal\n+int eal_log_journal(const char *opt);\n+\n /*\n  * Convert log level to string.\n  */\ndiff --git a/lib/log/log_journal.c b/lib/log/log_journal.c\nnew file mode 100644\nindex 0000000000..2475174fce\n--- /dev/null\n+++ b/lib/log/log_journal.c\n@@ -0,0 +1,200 @@\n+/* SPDX-License-Identifier: BSD-3-Clause */\n+\n+#include <limits.h>\n+#include <stdbool.h>\n+#include <stdint.h>\n+#include <stdio.h>\n+#include <stdlib.h>\n+#include <string.h>\n+#include <sys/socket.h>\n+#include <sys/stat.h>\n+#include <sys/uio.h>\n+#include <sys/un.h>\n+#include <unistd.h>\n+\n+#include <rte_common.h>\n+#include <rte_log.h>\n+\n+#include \"log_internal.h\"\n+#include \"log_private.h\"\n+\n+static enum {\n+\tLOG_JOURNAL_NEVER = 0,\t/* do not use journal */\n+\tLOG_JOURNAL_AUTO,\t/* use if stderr is set to journal */\n+\tLOG_JOURNAL_ALWAYS,\t/* always try to use journal */\n+} log_journal_opt = LOG_JOURNAL_AUTO;\n+\n+static int log_journal_fd = -1;\n+\n+int\n+eal_log_journal(const char *str)\n+{\n+\tif (str == NULL || strcmp(str, \"auto\") == 0)\n+\t\tlog_journal_opt = LOG_JOURNAL_AUTO;\n+\telse if (strcmp(str, \"always\") == 0)\n+\t\tlog_journal_opt = LOG_JOURNAL_ALWAYS;\n+\telse if (strcmp(str, \"never\") == 0)\n+\t\tlog_journal_opt = LOG_JOURNAL_NEVER;\n+\telse\n+\t\treturn -1;\n+\treturn 0;\n+}\n+\n+/*\n+ * send structured message using journal protocol\n+ * See: https://systemd.io/JOURNAL_NATIVE_PROTOCOL/\n+ */\n+static int\n+journal_send(const char *buf, size_t len)\n+{\n+\tstruct iovec iov[4];\n+\tunsigned int n = 0;\n+\tint priority = rte_log_cur_msg_loglevel() - 1;\n+\tchar msg[] = \"MESSAGE=\";\n+\tchar newline = '\\n';\n+\tchar pbuf[16];\t/* \"PRIORITY=N\\n\" */\n+\n+\tiov[n].iov_base = msg;\n+\tiov[n++].iov_len = strlen(msg);\n+\n+\tiov[n].iov_base = (char *)(uintptr_t)buf;\n+\tiov[n++].iov_len = len;\n+\n+\t/* if message doesn't end with newline, one will be applied. */\n+\tif (buf[len - 1] != '\\n') {\n+\t\tiov[n].iov_base = &newline;\n+\t\tiov[n++].iov_len = 1;\n+\t}\n+\n+\t/* priority value between 0 (\"emerg\") and 7 (\"debug\") */\n+\tiov[n].iov_base = pbuf;\n+\tiov[n++].iov_len = snprintf(pbuf, sizeof(pbuf),\n+\t\t\t\t    \"PRIORITY=%d\\n\", priority);\n+\n+\treturn writev(log_journal_fd, iov, n);\n+}\n+\n+\n+/* wrapper for log stream to put messages into journal */\n+static ssize_t\n+journal_log_write(__rte_unused void *c, const char *buf, size_t size)\n+{\n+\treturn journal_send(buf, size);\n+}\n+\n+static int\n+journal_log_close(__rte_unused void *c)\n+{\n+\tclose(log_journal_fd);\n+\tlog_journal_fd = -1;\n+\treturn 0;\n+}\n+\n+static cookie_io_functions_t journal_log_func = {\n+\t.write = journal_log_write,\n+\t.close = journal_log_close,\n+};\n+\n+/*\n+ * Check if stderr is going to system journal.\n+ * This is the documented way to handle systemd journal\n+ *\n+ * See: https://systemd.io/JOURNAL_NATIVE_PROTOCOL/\n+ *\n+ */\n+static bool\n+is_journal(int fd)\n+{\n+\tchar *jenv, *endp = NULL;\n+\tstruct stat st;\n+\tunsigned long dev, ino;\n+\n+\tjenv = getenv(\"JOURNAL_STREAM\");\n+\tif (jenv == NULL)\n+\t\treturn false;\n+\n+\tif (fstat(fd, &st) < 0)\n+\t\treturn false;\n+\n+\t/* systemd sets colon-separated list of device and inode number */\n+\tdev = strtoul(jenv, &endp, 10);\n+\tif (endp == NULL || *endp != ':')\n+\t\treturn false;\t/* missing colon */\n+\n+\tino = strtoul(endp + 1, NULL, 10);\n+\n+\treturn dev == st.st_dev && ino == st.st_ino;\n+}\n+\n+/* Connect to systemd's journal service */\n+static int\n+open_journal(void)\n+{\n+\tstruct sockaddr_un sun = {\n+\t\t.sun_family = AF_UNIX,\n+\t\t.sun_path = \"/run/systemd/journal/socket\",\n+\t};\n+\tint s;\n+\n+\ts = socket(AF_UNIX, SOCK_DGRAM, 0);\n+\tif (s < 0) {\n+\t\tperror(\"socket\");\n+\t\treturn -1;\n+\t}\n+\n+\tif (connect(s, (struct sockaddr *)&sun, sizeof(sun)) < 0) {\n+\t\tperror(\"connect\");\n+\t\tclose(s);\n+\t\treturn -1;\n+\t}\n+\n+\treturn s;\n+}\n+\n+bool log_journal_enabled(void)\n+{\n+\tif (log_journal_opt == LOG_JOURNAL_NEVER)\n+\t\treturn false;\n+\n+\tif (log_journal_opt == LOG_JOURNAL_AUTO &&\n+\t    !is_journal(STDERR_FILENO))\n+\t\treturn false;\n+\n+\tlog_journal_fd = open_journal();\n+\tif (log_journal_fd < 0)\n+\t\treturn false;\n+\n+\treturn true;\n+}\n+\n+void log_journal_open(const char *id)\n+{\n+\tFILE *log_stream;\n+\tchar *syslog_id = NULL;\n+\tssize_t len;\n+\n+\t/* Send identifier as first message */\n+\tlen = asprintf(&syslog_id, \"SYSLOG_IDENTIFIER=%s\\nSYSLOG_PID=%u\",\n+\t\t       id, getpid());\n+\tif (len == 0)\n+\t\tgoto error;\n+\n+\tif (write(log_journal_fd, syslog_id, len) != len) {\n+\t\tperror(\"write\");\n+\t\tgoto error;\n+\t}\n+\n+\tfree(syslog_id);\n+\n+\t/* redirect other log messages to journal */\n+\tlog_stream = fopencookie(NULL, \"w\", journal_log_func);\n+\tif (log_stream != NULL) {\n+\t\trte_openlog_stream(log_stream);\n+\t\treturn;\n+\t}\n+\n+error:\n+\tfree(syslog_id);\n+\tclose(log_journal_fd);\n+\tlog_journal_fd = -1;\n+}\ndiff --git a/lib/log/log_private.h b/lib/log/log_private.h\nindex c4eb533529..91976ab313 100644\n--- a/lib/log/log_private.h\n+++ b/lib/log/log_private.h\n@@ -20,5 +20,7 @@ int log_print_with_timestamp(FILE *f, const char *format, va_list ap);\n bool log_syslog_enabled(bool is_tty);\n void log_syslog_open(const char *id, bool is_terminal);\n \n+bool log_journal_enabled(void);\n+void log_journal_open(const char *id);\n \n #endif /* LOG_PRIVATE_H */\ndiff --git a/lib/log/log_stubs.c b/lib/log/log_stubs.c\nindex cb34217af8..6b2099f57b 100644\n--- a/lib/log/log_stubs.c\n+++ b/lib/log/log_stubs.c\n@@ -20,9 +20,18 @@\n #include \"log_internal.h\"\n #include \"log_private.h\"\n \n-/* Stubs for Windows */\n+#ifdef RTE_EXEC_ENV_WINDOWS\n int\n eal_log_syslog(const char *str __rte_unused)\n {\n \treturn -1;\n }\n+#endif\n+\n+#ifndef RTE_EXEC_ENV_LINUX\n+int\n+eal_log_journal(const char *str __rte_unused)\n+{\n+\treturn -1;\n+}\n+#endif\ndiff --git a/lib/log/meson.build b/lib/log/meson.build\nindex 37507299e7..0a80027326 100644\n--- a/lib/log/meson.build\n+++ b/lib/log/meson.build\n@@ -7,10 +7,14 @@ sources = files(\n         'log_timestamp.c',\n )\n \n-if is_windows\n-\tsources += files('log_stubs.c')\n-else\n+if not is_windows\n \tsources += files('log_syslog.c')\n endif\n \n+if is_linux\n+    sources += files('log_journal.c')\n+else\n+\tsources += files('log_stubs.c')\n+endif\n+\n headers = files('rte_log.h')\ndiff --git a/lib/log/version.map b/lib/log/version.map\nindex 14d6681a5f..7af97ece43 100644\n--- a/lib/log/version.map\n+++ b/lib/log/version.map\n@@ -26,6 +26,7 @@ INTERNAL {\n \tglobal:\n \n \teal_log_init;\n+\teal_log_journal;\n \teal_log_level2str;\n \teal_log_save_pattern;\n \teal_log_save_regexp;\n",
    "prefixes": [
        "v20",
        "13/14"
    ]
}