[FFmpeg-devel] new logging functionality

Michael Niedermayer michaelni at gmx.at
Fri Jun 29 20:21:53 CEST 2012


On Fri, Jun 29, 2012 at 01:47:34PM -0400, Martin Carroll wrote:
> In the process of trying to understand the implementation of
> ffplay/ffmpeg, I found it necessary to implement some new
> logging-related functions.  These functions make it easier to
> understand (e.g.) the dynamic call graph of a multi-threaded
> program.  I believe that these functions might be appreciated
> by other ffmpeg developers; if so, I would be happy to send the
> patch upstream (or discuss further).
> 
> Here, in more detail, is the new functionality:
> 
> 1. Forced log messages
>         The new function av_flog() forces the log message to come
>         out, regardless of the current log-level setting.  To enable
>         this feature, the variable do_flog in libavutil/log.c must
>         be set to 1.

why dont you just use a log level that is sufficiently high ?


>
> 2. Thread-id logging
>         To make it easier to see which thread is doing what, the
>         logger can now be configured to prefix all log messages
>         with either the numeric id or the name of the calling
>         thread.  (The name is printed if the thread was previously
>         registered with av_log_set_threadname().)  To enable this
>         feature, the variable print_threadid in libavutil/log.c
>         must be set to 1.
> 
> 3. Indentation for dynamic call graph
>         To make it easier to view the program's dynamic call graph,
>         the logger can now be configured to push and pop indentation
>         levels on the log messages.  The new macros LOGPUSH and
>         LOGPOP respectively increase and decrease the current
>         indentation level and also print information about the
>         name and file location of the function that is being
>         entered or returned from.  To enable this feature, the
>         variable do_pushpop in libavutil/log.c must be set to 1.

these 2 sound interresting

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120629/f74853e9/attachment.asc>


More information about the ffmpeg-devel mailing list