# HG changeset patch # User Milka Kuzminski # Date 2020-11-10 08:47:11 # Node ID d726114159eb6d6b0432c84a7bb40d35d8748af0 # Parent 5a847e1afc2bad3206d4649411d72ad923b01042 app: simplify logging, and startup time for cache backends. diff --git a/vcsserver/lib/rc_cache/__init__.py b/vcsserver/lib/rc_cache/__init__.py --- a/vcsserver/lib/rc_cache/__init__.py +++ b/vcsserver/lib/rc_cache/__init__.py @@ -64,7 +64,10 @@ def configure_dogpile_cache(settings): new_region.configure_from_config(settings, 'rc_cache.{}.'.format(region_name)) new_region.function_key_generator = backend_key_generator(new_region.actual_backend) - log.debug('dogpile: registering a new region %s[%s]', region_name, new_region.__dict__) + if log.isEnabledFor(logging.DEBUG): + region_args = dict(backend=new_region.actual_backend.__class__, + region_invalidator=new_region.region_invalidator.__class__) + log.debug('dogpile: registering a new region `%s` %s', region_name, region_args) region_meta.dogpile_cache_regions[region_name] = new_region