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 848F443D1B; Fri, 22 Mar 2024 01:30:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 72473402A7; Fri, 22 Mar 2024 01:30:34 +0100 (CET) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mails.dpdk.org (Postfix) with ESMTP id A7E7A400D6 for ; Fri, 22 Mar 2024 01:30:32 +0100 (CET) Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-29e0229d6b5so1178809a91.3 for ; Thu, 21 Mar 2024 17:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1711067432; x=1711672232; 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=eQgQlxDoef+miDjvt7VqIK+ELume8Dqn27MqrhbzxVk=; b=teBP/yjQhi+Fhy6e+zMKyGFO/qi9S/V/u/qMt/6D5LHuNdVWUcWoJ0YTHDVT1KB5Ui 0c6EbZA4rxPOxbD3C4xf40jv4Y25eCEpO09Yp+6U6cv8+4Ekr2Q5DyWJNo9DZZfaYzv8 sYjlQzeS7DU4mlpa/w+yG9a+Cow+3IImGmi5cyDvZnoZ0SqcEOzfBinqmQ5B25xn1PK6 uNhYvupg4pkCz/xWXuV/H/t3bXRfPJjoKoW5Wsv9fKab6xVG7nXaagNQgpPibkgoL8ve 4pWm9OfybdFMvMuFKzeSmZkr7Wz+77mMx+rLa685PxQ5RZ0h+TSHQrjxTIF8y72RBL4r 53iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711067432; x=1711672232; 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=eQgQlxDoef+miDjvt7VqIK+ELume8Dqn27MqrhbzxVk=; b=d3Ha/2YKa+JUlqyLkhl8YOAaKpwqv1PMPOfGENyGncSHtvIqvc5krBkiPc0xa0pS24 sIwp31gpOhiDWIRm6J5772KRWg0KRMPTHUT/DLpVJEdT7PB+RwNl4eV14XDpeoVlMt+u SNthH68yWecSeNJZG2qHW0tRDFOFe7NAMHd9b3sNJQPCjpLkPcu5fmw7t8Eqzw5R2Agh 6CY4mRpTyy8HjQpilMThZHt7ZAsW1/EjjUlvoc23Wt6qmbmOJ9tYC3iYBXpcrELkeAjJ km+Jj7NT6D+ffYydmS/qhP7lk4zibME2LMhCrugS/4Q3hP6lqk7/L2mhLWyz/HDkj6La mDpw== X-Gm-Message-State: AOJu0Yw2skyjAd/5bOAibGpHr7p0TakA5ehY1U7q/UukhGccy/2MVu2r /IvS/XxSIyfustI6RRjyf1CoNU35EsmfJe4ICtKCbiD/pW1hgIuL5UaltO3QNZg= X-Google-Smtp-Source: AGHT+IEt4Pw+GGHfBVRFMgVEIAN0Jm6CetxgburRW9SxbPgj/RJdDBdNtPTJ91maHB0DHe0UcuQFgg== X-Received: by 2002:a17:90a:d70d:b0:29d:fe1c:79e7 with SMTP id y13-20020a17090ad70d00b0029dfe1c79e7mr775171pju.45.1711067431760; Thu, 21 Mar 2024 17:30:31 -0700 (PDT) Received: from hermes.local (204-195-123-203.wavecable.com. [204.195.123.203]) by smtp.gmail.com with ESMTPSA id se8-20020a17090b518800b0029ffa01ae23sm563663pjb.23.2024.03.21.17.30.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 17:30:31 -0700 (PDT) Date: Thu, 21 Mar 2024 17:30:29 -0700 From: Stephen Hemminger To: Tyler Retzlaff Cc: dev@dpdk.org Subject: Re: [PATCH v10 08/10] eal: add option to put timestamp on console output Message-ID: <20240321173029.24635dde@hermes.local> In-Reply-To: <20240321174906.GA4897@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20200814173441.23086-1-stephen@networkplumber.org> <20240321161146.340421-1-stephen@networkplumber.org> <20240321161146.340421-9-stephen@networkplumber.org> <20240321171131.GD27371@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <20240321101636.0bab71ae@hermes.local> <20240321174906.GA4897@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Thu, 21 Mar 2024 10:49:06 -0700 Tyler Retzlaff wrote: > On Thu, Mar 21, 2024 at 10:16:36AM -0700, Stephen Hemminger wrote: > > On Thu, 21 Mar 2024 10:11:31 -0700 > > Tyler Retzlaff wrote: > > > > > > > > > > > > > > +Console timestamp > > > > +~~~~~~~~~~~~~~~~~ > > > > + > > > > +On Linux and FreeBSD, an optional timestamp can be added before each > > > > +message by adding the ``--log-timestamp`` option. > > > > > > i don't think Windows should be excluded from the feature, in general > > > core libraries that get features should cover all platforms. > > > > The problem is that current Linux/FreeBSD log code depends on fopencookie() > > to work. I could not find a way to do that on Windows. > > but that looks like it is part of general log initialization. surely > when we are talking about logging a timestamp to a console we're just > talking about a standard stream and a format string for Windows? > > i'll try to study more to gain a better understanding. > > thanks What the code does is take what rte_log created and add more data before actual printing it. The other option is doing this at rte_log() but that will break the syslog side. I am not sure that having log go directly to syslog makes sense anyway on a modern Linux system. If DPDK is being used by a daemon, that daemon will be a systemd service. And systemd has simple way to make stderr go to syslog. So if we drop the syslog support, then the whole thing gets more generic and simpler.