diff options
author | jbrjake <[email protected]> | 2008-10-09 00:16:14 +0000 |
---|---|---|
committer | jbrjake <[email protected]> | 2008-10-09 00:16:14 +0000 |
commit | 45307049935e7f3a991957d35f699bb00a288a5b (patch) | |
tree | 982b2af1c3a6ab45c5af29b6ffcd208bf4d7a64f /test | |
parent | a6f41219f1a6251da2ae5d31202b88adcce1ffc2 (diff) |
Adds an hb_deep_log() function for multiple levels of debugging verbosity. Level 1 displays when hb_log does (job->verbose == 1) and is now meant for logging that helps in tech support. Level 2 adds memory-related logging like freed buffers, and level 3 is for granular stuff that displays once per sample, frame, packet, etc. The debug level continues to be set when hb_init() is called.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1819 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'test')
-rw-r--r-- | test/test.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/test/test.c b/test/test.c index da870c289..03570016a 100644 --- a/test/test.c +++ b/test/test.c @@ -1467,7 +1467,7 @@ static void ShowHelp() "### General Handbrake Options------------------------------------------------\n\n" " -h, --help Print help\n" " -u, --update Check for updates and exit\n" - " -v, --verbose Be verbose\n" + " -v, --verbose <#> Be verbose (optional argument: logging level)\n" " -C, --cpu Set CPU count (default: autodetected)\n" " -Z. --preset <string> Use a built-in preset. Capitalization matters, and\n" " if the preset name has spaces, surround it with\n" @@ -1661,7 +1661,7 @@ static int ParseOptions( int argc, char ** argv ) { { "help", no_argument, NULL, 'h' }, { "update", no_argument, NULL, 'u' }, - { "verbose", no_argument, NULL, 'v' }, + { "verbose", optional_argument, NULL, 'v' }, { "cpu", required_argument, NULL, 'C' }, { "format", required_argument, NULL, 'f' }, @@ -1719,7 +1719,7 @@ static int ParseOptions( int argc, char ** argv ) int c; c = getopt_long( argc, argv, - "hvuC:f:4i:Io:t:Lc:m::a:6:s:UFN:e:E:2dD:7895gpOP::w:l:n:b:q:S:B:r:R:Qx:TY:X:Z:z", + "hv::uC:f:4i:Io:t:Lc:m::a:6:s:UFN:e:E:2dD:7895gpOP::w:l:n:b:q:S:B:r:R:Qx:TY:X:Z:z", long_options, &option_index ); if( c < 0 ) { @@ -1735,7 +1735,14 @@ static int ParseOptions( int argc, char ** argv ) update = 1; break; case 'v': - debug = HB_DEBUG_ALL; + if( optarg != NULL ) + { + debug = atoi( optarg ); + } + else + { + debug = 1; + } break; case 'C': cpu = atoi( optarg ); |