On Thu, 21 Mar 2024 10:49:06 -0700
Tyler Retzlaff <roret...@linux.microsoft.com> 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 <roret...@linux.microsoft.com> 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.

Reply via email to