[FFmpeg-devel] [PATCH] cmdutils: add log time info into report log file

Nicolas George george at nsup.org
Mon Jun 5 20:31:36 EEST 2017

Le quintidi 15 prairial, an CCXXV, Steven Liu a écrit :
>     I get some problem of the log output:
>     1. the log output by multiple av_log to one line,
>          for example:
>              av_log(NULL, "major_brand     :");
>              av_log(NULL, "isom\n");
>          then if add the time to the line head, it will output looks like this:
>              [1496470846077636] -     major_brand     :
> [1496470846077643] - isom[1496470846077650] -

Yes, you will have to come up with a solution for that. Maybe look how
the [component @ 0xaddress] prefix is added.

(But I also think we should try and get rid of these construct, make
av_log() more "send a complete message to the user" and less "print
something to the terminal", because the latter only works when there is
actually a terminal.)

>      2. but if add the time to the end of line, it maybe need control
> right alignment

Aligning to the right would be a terrible idea. And impossible on top of
that, since any later line can be longer and invalidate the alignment.

>      3. maybe the better solution is add the time into line head when
> the log level big than AV_LOG_WARNING ?

I do not think that changing the format depending on the log level is a
good idea. And it does not help anyway.


  Nicola George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170605/a710408a/attachment.sig>

More information about the ffmpeg-devel mailing list