Uploaded image for project: 'Cache Modules'
  1. Cache Modules
  2. MGNLCACHE-231

Improve cache debug/trace logging

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Neutral
    • Resolution: Done
    • Affects Version/s: 5.9.1
    • Fix Version/s: 5.9.2
    • Component/s: None
    • Labels:
    • Sprint:
      Maintenance 25
    • Story Points:
      0.5

      Description

      To better help customers verify their cache configurations it would be useful to see the cache flush events confirmed in the log. Especially since the introduction of the site aware cache policy. I would like to be able to see the cache flush confirmed in the log at the debug level:

      log.trace("Cache flushed: {}", cacheName);
      

      Features added:

      • Each flush command now has TRACE level logging for flush events including names of caches being flushed.
      • Observation registration for cache flushing is now recorded at TRACE level. Can be seen during startup phase of the cache module.
      • FlushAllListeningPolicy records flush events at TRACE level which includes the name of the cache being flushed.
      • CachePolicyResult #toString() method updated to include the name of the cache being used. This can be observed by turning the cache filter to DEBUG.

      Enable debug/trace in log4j2:

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

        Checklists

        Acceptance criteria

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                fgrilli Federico Grilli
                Reporter:
                rgange Richard Gange
                Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Checklists

                    DoD

                      Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 3h
                      3h