add VIPS_TRACE env var

to enable --vips-cache-trace
This commit is contained in:
John Cupitt 2016-09-12 11:01:40 +01:00
parent d3cafb3a9f
commit eb320f41e1
2 changed files with 6 additions and 1 deletions

View File

@ -1010,6 +1010,9 @@ vips_cache_set_dump( gboolean dump )
*
* Handy for debugging. Print operation cache actions to stdout as we run.
*
* You can set the environment variable `VIPS_TRACE` to turn this option on, or
* use the command-line flag `--vips-cache-trace`.
*
* See also: vips_cache_set_dump().
*/
void

View File

@ -328,11 +328,13 @@ vips_init( const char *argv0 )
bindtextdomain( GETTEXT_PACKAGE, name );
bind_textdomain_codeset( GETTEXT_PACKAGE, "UTF-8" );
/* Default info setting from env.
/* Default various settings from env.
*/
if( g_getenv( "VIPS_INFO" ) ||
g_getenv( "IM_INFO" ) )
vips_info_set( TRUE );
if( g_getenv( "VIPS_TRACE" ) )
vips_cache_set_trace( TRUE );
/* Register base vips types.
*/