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

Lynne dev at lynne.ee
Fri Feb 17 13:49:58 EET 2023


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.



More information about the ffmpeg-devel mailing list