[FFmpeg-devel] [PATCH] libavutil/log: Support for logging timestamps in the log

Prakash duggaraju at gmail.com
Fri Feb 17 20:55:08 EET 2023


Logging timestamps is a basic functionality any logging
framework/infrastructure should support.
If I am using ffmpeg as a binary then I would need this functionality built
in.
Agree that the code in log.c can definitely be simplified but didn't want
to make any changes with potential for breaking the log output.

-Prakash

On Fri, Feb 17, 2023 at 3:50 AM Lynne <dev at lynne.ee> wrote:

> Feb 17, 2023, 12:08 by anton at khirnov.net:
>
> > Quoting Prakash (2023-02-17 01:16:04)
> >
> >> Moved the timestamp to the front (before loglevel but after the prefix
> if
> >> present, so the timestamp has the same color as log line based on log
> >> level).  Updated the patch and attached again.
> >>
> >>
> >> From 04857a7bf0d4cf24a479e795a55a61ab2e2f618e Mon Sep 17 00:00:00 2001
> >> From: Prakash Duggaraju <duggaraju at gmail.com>
> >> Date: Thu, 16 Feb 2023 16:06:29 -0800
> >> Subject: [PATCH] libavutil/log: Support for logging timestamps in the
> log.
> >> Add
> >>  'time' flag to the -loglevel option to turn on timestamp logging.
> Useful
> >> for
> >>  troubleshooting where time is spent from the log files.
> >>
> >> Signed-off-by: Prakash Duggaraju <duggaraju at gmail.com>
> >> ---
> >>  doc/fftools-common-opts.texi |  4 ++++
> >>  fftools/opt_common.c         |  6 ++++++
> >>  libavutil/log.c              | 41 +++++++++++++++++++++++++-----------
> >>  libavutil/log.h              |  8 +++++++
> >>  4 files changed, 47 insertions(+), 12 deletions(-)
> >>
> >
> > I do not like this patch.
> >
> > The default logging callback should be simple and straightforward, not a
> > kitchen sink of all possible functionality.
> >
> > Callers who need this can and should implement this themselves.
> >
>
> Same, having the class pointer makes it already quite busy.
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-devel mailing list