[MGNLADVCACHE-110] Improve advanced cache debug/trace logging Created: 11/Aug/20  Updated: 31/Aug/21  Resolved: 03/Nov/20

Status: Closed
Project: Advanced Cache
Component/s: core
Affects Version/s: 2.3.1
Fix Version/s: 2.3.2

Type: Improvement Priority: Neutral
Reporter: Richard Gange Assignee: Federico Grilli
Resolution: Done Votes: 0
Labels: maintenance, quickwin, site-aware
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MGNLADVCACHE-112 DOC: Clarify that site aware caching ... Closed
relation
is related to MGNLCACHE-231 Improve cache debug/trace logging Closed
is related to MGNLADVCACHE-116 Site aware caching no longer creates ... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

Extension of the work done in MGNLCACHE-231.

Features added

  • SiteAwareFlushAllListeningPolicy records flush events at TRACE level which includes the name of the cache being flushed.
  • Advanced cache module records site aware caching is enabled at INFO level.
  • Advanced cache module records starting/stopping of caches at TRACE level.

Enable debug/trace in log4j2:

<Logger name="info.magnolia.module.advancedcache" level="ALL"/>


 Comments   
Comment by Richard Gange [ 11/Aug/20 ]

Startup example:

2020-08-11 18:33:28,393 INFO  info.magnolia.module.ModuleManagerImpl            : Starting module advanced-cache
2020-08-11 18:33:28,393 INFO  .magnolia.module.advancedcache.AdvancedCacheModule: Site aware caching enabled.
2020-08-11 18:33:28,648 TRACE class org.ehcache.core.Ehcache-site               : Initializing
2020-08-11 18:33:28,668 WARN  .ehcache.impl.internal.store.disk.OffHeapDiskStore: The index for data file ehcache-disk-store.data is out of date by 9821934ms, probably due to an unclean shutdown. Creating a new empty store.
2020-08-11 18:33:28,724 DEBUG class org.ehcache.core.Ehcache-site               : Initialize successful.
2020-08-11 18:33:28,731 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'dam' (cache named site): 
2020-08-11 18:33:28,731 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'keystore' (cache named site): 
2020-08-11 18:33:28,731 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'contacts' (cache named site): 
2020-08-11 18:33:28,731 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'usergroups' (cache named site): 
2020-08-11 18:33:28,731 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'scripts' (cache named site): 
2020-08-11 18:33:28,732 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'tours' (cache named site): 
2020-08-11 18:33:28,732 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'userroles' (cache named site): 
2020-08-11 18:33:28,732 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'campaigns' (cache named site): 
2020-08-11 18:33:28,732 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'stories' (cache named site): 
2020-08-11 18:33:28,732 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'workflow' (cache named site): 
2020-08-11 18:33:28,732 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'tags' (cache named site): 
2020-08-11 18:33:28,732 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'visitors' (cache named site): 
2020-08-11 18:33:28,733 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'tasks' (cache named site): 
2020-08-11 18:33:28,733 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'contentlocks' (cache named site): 
2020-08-11 18:33:28,733 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'category' (cache named site): 
2020-08-11 18:33:28,733 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'segments' (cache named site): 
2020-08-11 18:33:28,733 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'rankings' (cache named site): 
2020-08-11 18:33:28,733 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'rss' (cache named site): 
2020-08-11 18:33:28,733 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'personas' (cache named site): 
2020-08-11 18:33:28,733 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'resources' (cache named site): 
2020-08-11 18:33:28,734 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'default' (cache named site): 
2020-08-11 18:33:28,734 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'pendingContacts' (cache named site): 
2020-08-11 18:33:28,734 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'marketing-tags' (cache named site): 
2020-08-11 18:33:28,734 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'config' (cache named site): 
2020-08-11 18:33:28,737 TRACE magnolia.module.cache.AbstractListeningFlushPolicy: Registered cache flushing observation for workspace 'website' (cache named site): 
2020-08-11 18:33:28,737 TRACE .magnolia.module.advancedcache.AdvancedCacheModule: Starting cache: site
Generated at Sun Feb 11 23:11:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.