From owner-freebsd-hackers@freebsd.org Mon Apr 2 13:17:11 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9262F584C7 for ; Mon, 2 Apr 2018 13:17:10 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 077EB7DDC8 for ; Mon, 2 Apr 2018 13:17:10 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-wm0-x22c.google.com with SMTP id v21so25470150wmc.1 for ; Mon, 02 Apr 2018 06:17:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ETsZqPs0PKO3cvMAhHf1DO+Djk/tDQYZjTom28ipcoo=; b=LUunaTq9mLD093AdDgWAEjEJljUWu87tWunmh/o3jcuIl5LasjDPyEpf8q83L5gfgU So/z2FkNal7rcLQem5eAYRzCVs1DM9cAi1zURwup3g1dn4o6xNiiqz+tKAxsl6gOeZPV gTL9UuiW5IEZ9UIYpu1v7Y/i2ZPiKNVxDdB+luOwgE8B+1HrEsfbHQz2OLoqGOph38MR N+YmcLB1ZlcKejsyUXE1FE/K4pQ+MaA++tbugDQCuf4HKihnNmjAwc0w5lQIwd3HEn57 s4CLt8rFEJNaF7839xMSW9IwtqWEinqgL1Cg0FYXD/BoMeynbmiHNv4cGTIpihCb4M3I 1bEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ETsZqPs0PKO3cvMAhHf1DO+Djk/tDQYZjTom28ipcoo=; b=aCjyVai5UXoWJLMw6IvXTn/H4Z7sRKjzN5JmTKPdCN5RUIdj+BDiU7gbgiGuRDQpgK sS6mkdhtJNX21b5n4zO3QAfIc6alezIckR9xvtrSgDkQwRz3kfFTaUdTrsuEC6Muqfkp QmMLh/1sO0U8SqvKmJRqe0StOd+wtL73Ltc3f4PMvg/tsqaR1Kiz/sDIEr8ELfp/4ZT9 oYhufIdNS/OCoembmLb5GlP8j8ziq4P269YMB3Fq5VcQ/BCKdr1NA3y6N0ihGLP2zT+R qhVSi4ehoxMWk6mkzz4zTAp/E3W3po3cCNj/qE3h5+g1fMJl8Ge/UvBi8FWrD23AHVO3 E67A== X-Gm-Message-State: ALQs6tA3wj1Q5kgv/oeWG44qiGLX772yy8HB0MZaia2aPW1KK/jGGY7G G5Bja2ENC/5fzFcFVZul8EiAHRkN6JUf1dfsKpRfeQ== X-Google-Smtp-Source: AIpwx4+UoMbhRKVRU+yCOYlrcmzqo1DVosBjZIdZAOWXWqFonnw1PLyvuRapV/fY3VJwRUF8SIJhwfts6vxI8jKdLww= X-Received: by 10.46.154.145 with SMTP id p17mr5809473lji.28.1522675028157; Mon, 02 Apr 2018 06:17:08 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:e9c2:0:0:0:0:0 with HTTP; Mon, 2 Apr 2018 06:16:37 -0700 (PDT) In-Reply-To: References: From: Ed Schouten Date: Mon, 2 Apr 2018 15:16:37 +0200 Message-ID: Subject: Re: Add option -Z to syslogd(8) to use ISO 8601 timestamps To: Ben Woods Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2018 13:17:11 -0000 Hi Ben, 2018-04-02 12:22 GMT+02:00 Ben Woods : > That is a coincidence. Having looked through your code, I realise it is far > better than mine, and mine actually resulted in the syslogd output being > non-compliant with both RFC3164 and RFC5424 (by using the RFC5424 timestamp > format with the remainder of the log matching the RFC3164 format). I have > therefore abandoned my review in favour of yours. > > My effort has not been wasted though, as it meant that I was recently > familiar with the syslogd.c code, and the contents of RFC3164 and RFC5424, > and therefore had a headstart in reviewing your patch. I have provided some > comments in phabricator for your consideration. Yes, exactly! Having someone who can review my changes thoroughly is incredibly useful. Thanks a lot for your feedback so far! I'll take a look at it later today and revise my patch where needed. > I think you have already handled the hard part of the migration to RFC5424, > which is the updated parsing logic. Whilst you have yet changed the log > output format to RFC5424, I suspect that will be the easy bit. Exactly. We do have to investigate whether we also want to use RFC 5424 to format console messages. It may be a bit too verbose, especially for 80 column consoles. This is exactly why I left changing the output format to another change. > When it comes time to change the output format, it is worth noting that > NetBSD has provided the "-o" syslogd argument to allow the sysadmin to > select the output format: > > -o output_format > Select output message format. > bsd, rfc3164 traditional BSD Syslog format (default) > syslog, rfc5424 new syslog-protocol format Yes! Being compatible with NetBSD here sounds like a good idea indeed. No need to deviate unnecessarily. Best regards, -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands