diff --git a/libvips/iofuncs/cache.c b/libvips/iofuncs/cache.c index 26f6b7b4..c2393e2e 100644 --- a/libvips/iofuncs/cache.c +++ b/libvips/iofuncs/cache.c @@ -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 diff --git a/libvips/iofuncs/init.c b/libvips/iofuncs/init.c index 7398374e..403dd527 100644 --- a/libvips/iofuncs/init.c +++ b/libvips/iofuncs/init.c @@ -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. */