From nobody Mon Jul 3 12:46:46 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qvlzp2bjhz4lJv8; Mon, 3 Jul 2023 12:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qvlzp2BBdz3D2T; Mon, 3 Jul 2023 12:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688388406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2BQ5TLa0Nr1Xqyy/vlYUsAibS/bzQhr57zdRS0QFJyU=; b=gODtKPoMccD3Mf6tyhP7tq492b61AF1LLspHjqVHskRLWWyQ8sfh3+vX15p3IQnH0lNPC7 dbocHyeIaHU/i/1/PG2BU1Nf4UIIRwKimc6NOm8o4DRykPRcdVSk3cKlDQDrsv9IYMY3Xj 7PF8fA6C42OIhxqFx/JciVUUDm7/9m8/a5DaIpU8Fhpeemim5yr5zZnpOiTjJLl2UZB/v4 LuKb+iIeQj1SK5hoQ+UJx+51+OQ7FLXZsf0BiUAvOxZAEGlJwSICGJqUy4DRU6Vjvk0tQm CAQjbVol1j7dyK+LQ7JvHrPkEKBQAPQp/pHJoLpP2RRtJEzRISEcMH4ORTKJ8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688388406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2BQ5TLa0Nr1Xqyy/vlYUsAibS/bzQhr57zdRS0QFJyU=; b=hPWDbdtC26ZRm4Wfjso9ln+9OwraHasYdzW5JdTxkm5YDR05YVFLV81JlFk8l2KcFLXe+i lt70c5prItTggzeAFHOeQyd7VIQpcn1edJfz3E5XA1UBDgkTcwsu25ptcLQRC8JSt+xP87 pUU5EFrAFPJagCG+Lislz1VgBIMVI79RaDPmMFgw0sLoCqGHLOoX/Sdwjt9PXQiLsXnFNP 91ENhLPSLN2nzlZcC2xhbRbG/n+K/J+KIcabRXuCZz7YuzQb1sMMDn+HTSAHnJ4JC/IJUX NlU/7ogy0xNOqvSxOVSFumH9LpUU83Vqd2aNxII2rEsMNIxkjulv9slbAiN5mA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688388406; a=rsa-sha256; cv=none; b=oD5KGeeoqz1jamJCog/wJxd/TKit5qhr+Y/fr4S0G3UsfLu6cFwYAEHnFBP2Rk7eluHrg5 pVY6TQFViGb/wEMvcOjeRQ1kL+0Dn2GRjOMLaKQUzML67U/gv7uQ6URJQJN1YHslc7ub2f gMmCtyanGglkgBlGdE/n8z5bLAIL2dwcqurNt+X9/E5S7CJf6LQ7WvB7NU5SZG38mdIR9X d36jWjN1t6/a8429hcFQp10Ncau/UNObKC4PGYXesMq1B1hwEIEx9iN1wrkaM2XjZdrXgF bLXA6W+VlMFlUx7Ek/hJViRyds/Abkt7uszrNRzw1DvFSYB2a7CsU8nz80Qkag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qvlzp1DW9zrDK; Mon, 3 Jul 2023 12:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 363Ckk9a069361; Mon, 3 Jul 2023 12:46:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 363Ckktu069360; Mon, 3 Jul 2023 12:46:46 GMT (envelope-from git) Date: Mon, 3 Jul 2023 12:46:46 GMT Message-Id: <202307031246.363Ckktu069360@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eugene Grosbein Subject: git: 5aee3e14d491 - main - syslog.3: document ident[N] format List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5aee3e14d4914c7c99bce80da17b3100cb1f4490 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=5aee3e14d4914c7c99bce80da17b3100cb1f4490 commit 5aee3e14d4914c7c99bce80da17b3100cb1f4490 Author: Eugene Grosbein AuthorDate: 2023-07-03 12:35:37 +0000 Commit: Eugene Grosbein CommitDate: 2023-07-03 12:46:40 +0000 syslog.3: document ident[N] format When libc switched to generation of logs as per RFC 5424, that change broke application ability to insert specific process id using ident[N] format, the feature existed for decades. Some processes rely on it (including logger and syslogd). Later the regression was fixed but the feature remained undocumented. This change documents it. MFC after: 1 week --- lib/libc/gen/syslog.3 | 7 ++++++- usr.bin/logger/logger.1 | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/syslog.3 b/lib/libc/gen/syslog.3 index ce7dfdccf55e..1c19444405e9 100644 --- a/lib/libc/gen/syslog.3 +++ b/lib/libc/gen/syslog.3 @@ -28,7 +28,7 @@ .\" @(#)syslog.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd May 13, 2021 +.Dd July 3, 2023 .Dt SYSLOG 3 .Os .Sh NAME @@ -131,6 +131,11 @@ The .Fa ident argument is a string that will be prepended to every message. +It may be formatted as +.Fa ident[N] +in which case decimal number +.Fa N +replaces the process id within messages. The .Fa logopt argument diff --git a/usr.bin/logger/logger.1 b/usr.bin/logger/logger.1 index 9842ffc0af1c..a2774b9e3500 100644 --- a/usr.bin/logger/logger.1 +++ b/usr.bin/logger/logger.1 @@ -28,7 +28,7 @@ .\" @(#)logger.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd March 16, 2022 +.Dd July 3, 2023 .Dt LOGGER 1 .Os .Sh NAME @@ -74,6 +74,8 @@ tries to send the message to all addresses. Log the process id of the logger process with each line. This flag is ignored and the process id is always logged. +See also +.Fl t . .It Fl s Log the message to standard error, as well as the system log. .It Fl f Ar file @@ -153,6 +155,10 @@ and Mark every line in the log with the specified .Ar tag rather than the default of current login name. +Use +.Fl t Ar tag[N] +to insert specific decimal process id instead of id of +.Nm . .It Ar message Write the message to log; if not specified, and the .Fl f