From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E729745B6A; Fri, 18 Oct 2024 19:46:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A58F240267; Fri, 18 Oct 2024 19:46:02 +0200 (CEST) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id C8D2F4025C for ; Fri, 18 Oct 2024 19:46:00 +0200 (CEST) Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-2e2dcf4b153so1854745a91.1 for ; Fri, 18 Oct 2024 10:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729273560; x=1729878360; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=aDDGvs7ksVTUw2q0g07u3Mx7v5zWjpi7IEYPDEMFwPI=; b=eHtQ9RQyskHz9Nd0C8Jw7KaVOLsyI4hZ01kJ/4GW/b4RkMCzbZ36AbHHMXN+EUjKL6 MiKVA8QOp4IBYfh4d/VR53Yrjdor/jf65wTXKwyuQNOxqplCcfBH9+06bFpkJ9rOUWcR hH0yWgTaIlG4ik92ZcCVShR+j8rUAmgvIFTMFDfRshX4gAibGFTsQOYD3Ld+1rXZAvUu GTkBz+iBRJHWUXdf2732JUfnjxDfSitOojihLjFzXQyLVG8p7D6xrMIbiHtBfG7mbHE4 A4MaojzutIXMds/oq14NK4nOTqvSJ11VfSpF67RarcQID7IPTPJ8gArYLftq0+LkHcjo J34A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729273560; x=1729878360; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aDDGvs7ksVTUw2q0g07u3Mx7v5zWjpi7IEYPDEMFwPI=; b=SK4jdpRuUhSKsdTixSEMPXsyB8GIzVbUyTsuq8kS8sBG9BZaK/ztjt3HcVAkneQ4QD dMX8S5KMuQ+1Bd99iiofOpzxIHE75LRJM00Vdo/Z23veugrSCsI6bvpecj3/TI3MqFc7 Ry+4blcFuBeHEq4SSV2UKsPtuJG1kY2SBvmenESfZTOWDbN09hrjLdwhQ7DJAs5vAK4a euU67JcQf2FKKLtGxjmUKECuYI74RywhRZM+hl/ZOlOg8pur6Kn0fvb/IM+INvXnoAcD iWnL5w4EpZ6TTGqVSZ0zM2tLzl0fW4XfDNcFwHNqMfkLasB2AXlnI1KJ3FpXtzqqxDrX LDww== X-Gm-Message-State: AOJu0Yz59NSxxkyitXnKQYrzDtuHYBUeJrCs8TYEfGE4jZJ7QqtaMY1N xsG1gupysasTTzUgCzkHnL8bPFAa+9WjCzKBy0pTJ5RWSY8BLfAbfxcXiOotX+I= X-Google-Smtp-Source: AGHT+IFd6P784iRQkti2syL1DQ1HJymlgmHt2AdJpjS66n7RoqzxqiDQJPmgWeUgfph5sdz35qR/aQ== X-Received: by 2002:a17:90b:796:b0:2d8:a672:1869 with SMTP id 98e67ed59e1d1-2e5618f9e82mr3477200a91.32.1729273559874; Fri, 18 Oct 2024 10:45:59 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e55da3b8aesm2399234a91.46.2024.10.18.10.45.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 10:45:59 -0700 (PDT) Date: Fri, 18 Oct 2024 10:45:57 -0700 From: Stephen Hemminger To: David Marchand Cc: dev@dpdk.org Subject: Re: [PATCH v26 00/15] Log subsystem improvements Message-ID: <20241018104557.2d371069@hermes.local> In-Reply-To: References: <20200814173441.23086-1-stephen@networkplumber.org> <20241016202343.190653-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, 18 Oct 2024 19:07:18 +0200 David Marchand wrote: > Hello Stephen, >=20 > On Wed, Oct 16, 2024 at 10:24=E2=80=AFPM Stephen Hemminger > wrote: > > > > Improvements and unification of logging library. > > This version works on all platforms: Linux, Windows and FreeBSD. > > > > This is update to rework patch set. It adds several new features > > to the console log output. > > > > * Putting a timestamp on console output which is useful for > > analyzing performance of startup codes. Timestamp is optional > > and must be enabled on command line. > > > > * Displaying console output with colors. > > It uses the standard conventions used by many other Linux commands > > for colorized display. The default is to enable color if the > > console output is going to a terminal. But it can be always > > on or disabled by command line flag. This default was chosen > > based on what dmesg(1) command does. > > > > Color is used by many tools (vi, iproute2, git) because it is helpf= ul; > > DPDK drivers and libraries print lots of not very useful messages. > > And having error messages highlighted in bold face helps. > > This might also get users to pay more attention to error messages. > > Many bug reports have earlier messages that are lost because > > there are so many info messages. > > > > * Add support for automatic detection of systemd journal > > protocol. If running as systemd service will get enhanced > > logging. > > > > * Use of syslog is optional and the meaning of the > > --syslog flag has changed. The default is *not* to use > > syslog if output is going to a terminal. > > > > Add myself as maintainer for log because by now have added > > more than previous authors. =20 >=20 > Thanks for the series. >=20 > Overall, it looks good, but I am too short on time for merging in rc1 > and I have some comments. > I'll consider merging it in rc2. >=20 >=20 > - The main point is the "automatic" aspect but we want to provide some > way to force where the logs end up. > With this series, the user has --syslog (whose meaning is changed) and > --log-journal options to affect where the logs go. > Can we get a single option? > Like maybe --log-destination=3Dconsole|syslog|journal|auto ? That could work. The goal here is to do the right thing without options. And reduce the duplication. Right now, applications end up logging to both console and syslog. >=20 > - I don't really understand why changing the --syslog is better. > We lose the ability to select the syslog facility. > Either this feature was useless, and I would rather deprecate or > remove it explicitly (and the --syslog with it). > Or we should keep it as is for compat reason. Syslog facility really was pretty useless. The number of facilities is too small and there never was a good reason to have it. Maybe keep old option syntax as fallback? >=20 > - The color and timestamping options only affect the console output, > which is not clear with the --log-color / --log-timestamp names. > Maybe we can enhance with some other name? Timestamp is unneeded with syslog or journal since they do it already. It is possible to force timestamp or color when going to a file (by setting log stream). Did consider that options could be: --color and --timestamp but seemed better to keep all log related options together. >=20 > - Did you test redirecting all logs to an external logging function? > I suppose it still works, but it is important not to break such feature f= or OVS. Did not have test for that, should be put in functional tests. I flip/flopped on default for color. I like the auto mode and it might make users see errors more. But concerned that things like CI which are capturing via pseudo-terminals might get color and not know what to do with it. Final version defaults to off.