diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-20 02:48:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-20 02:48:19 +0200 |
commit | 8e8219e0f0725116809cdd1c17c868cb08da0dec (patch) | |
tree | eccf6f91c9ff4d49aaa71727640934cec80fcfa0 /libavutil/log.c | |
parent | 93db2708d3b0bcc1f1d87d23ae8adbedd8ea6660 (diff) | |
parent | c253340ae6f74ffd8798bbd476e46d1b33a2d56e (diff) | |
download | ffmpeg-8e8219e0f0725116809cdd1c17c868cb08da0dec.tar.gz |
Merge commit 'c253340ae6f74ffd8798bbd476e46d1b33a2d56e'
* commit 'c253340ae6f74ffd8798bbd476e46d1b33a2d56e':
log: Introduce a more verbose debug level
Conflicts:
doc/APIchanges
doc/fftools-common-opts.texi
libavutil/log.c
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/log.c')
-rw-r--r-- | libavutil/log.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavutil/log.c b/libavutil/log.c index 2091316957..b256d07624 100644 --- a/libavutil/log.c +++ b/libavutil/log.c @@ -50,6 +50,7 @@ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; static int av_log_level = AV_LOG_INFO; static int flags; +#define NB_LEVELS 8 #if defined(_WIN32) && !defined(__MINGW32CE__) && HAVE_SETCONSOLETEXTATTRIBUTE #include <windows.h> static const uint8_t color[16 + AV_CLASS_CATEGORY_NB] = { @@ -60,6 +61,7 @@ static const uint8_t color[16 + AV_CLASS_CATEGORY_NB] = { [AV_LOG_INFO /8] = 7, [AV_LOG_VERBOSE/8] = 10, [AV_LOG_DEBUG /8] = 10, + [AV_LOG_TRACE /8] = 8, [16+AV_CLASS_CATEGORY_NA ] = 7, [16+AV_CLASS_CATEGORY_INPUT ] = 13, [16+AV_CLASS_CATEGORY_OUTPUT ] = 5, @@ -91,6 +93,7 @@ static const uint32_t color[16 + AV_CLASS_CATEGORY_NB] = { [AV_LOG_INFO /8] = 253 << 8 | 0x09, [AV_LOG_VERBOSE/8] = 40 << 8 | 0x02, [AV_LOG_DEBUG /8] = 34 << 8 | 0x02, + [AV_LOG_TRACE /8] = 34 << 8 | 0x07, [16+AV_CLASS_CATEGORY_NA ] = 250 << 8 | 0x09, [16+AV_CLASS_CATEGORY_INPUT ] = 219 << 8 | 0x15, [16+AV_CLASS_CATEGORY_OUTPUT ] = 201 << 8 | 0x05, @@ -328,9 +331,9 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl) sanitize(part[1].str); colored_fputs(type[1], 0, part[1].str); sanitize(part[2].str); - colored_fputs(av_clip(level >> 3, 0, 6), tint >> 8, part[2].str); + colored_fputs(av_clip(level >> 3, 0, NB_LEVELS - 1), tint >> 8, part[2].str); sanitize(part[3].str); - colored_fputs(av_clip(level >> 3, 0, 6), tint >> 8, part[3].str); + colored_fputs(av_clip(level >> 3, 0, NB_LEVELS - 1), tint >> 8, part[3].str); end: av_bprint_finalize(part+3, NULL); #if HAVE_PTHREADS |