Understanding Sitecore logs – Part 1: xDB, Tracking, License, Path Analyzer and Memory Monitor

Subscribe to my newsletter and never miss my upcoming articles

I want to start a series of blogs describing what each line in the Sitecore logs mean. I am basing my research on the log information extracted from Sitecore 9.1 Update-1 with the log priority level set to “INFO”.

Let’s start with the log file.

The log file is usually located in the configured data folder of your website (e.g. \App_Data\logs) and is created with the pattern log.yyyymmdd.hhmmss.txt (e.g. log.20190731.175131.txt).

xDB, Tracking, License logs

13448 16:39:23 INFO  **********************************************************************
13448 16:39:23 INFO  **********************************************************************
13448 16:39:23 INFO  
13448 16:39:23 INFO  xDB is enabled.
13448 16:39:23 INFO  
13448 16:39:23 INFO  Tracking is enabled.
13448 16:39:23 INFO  
13448 16:39:23 INFO  Valid xDB license is present.
13448 16:39:23 INFO  
13448 16:39:23 INFO  **********************************************************************
13448 16:39:23 INFO  **********************************************************************

This is the first block you are going to see and it’s logged by the class Sitecore.Xdb.Configuration.Pipelines.Initialize. ShowXdbInfo, Sitecore.Xdb.Configuration.

It shows:

  • xDB is enabled, based on the Xdb.Enabled setting located in the \App_Config\Sitecore\Marketing.xDB\Sitecore.Xdb.config file or by a configuration patch file .
  • Tracking is enabled, based on the Xdb.Tracking.Enabled setting located in the \App_Config\Sitecore\Marketing.xDB\Sitecore.Xdb.config file or by a configuration patch file.
  • xDB license is present. It checks the license by searching for any of the following keywords within your license file: “Sitecore.xDB.Base”, “Sitecore.xDB.Plus”, “Sitecore.xDB.Premium”, “Sitecore.xDB.Base.Cloud”, “Sitecore.xDB.Plus.Cloud”, “Sitecore.xDB.Premium.Cloud”, “Sitecore.xDB.Enterprise.Cloud”

image.png

Path Analyzer dependencies

The Path Analyzer is a component which analyzes visitor paths through a website and evaluates the analytics values associated with those visits. You can learn more at the Path Analyzer documentation.

image.png

27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterType) Sitecore.SequenceAnalyzer.Data.ITreeStorage
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterType) Sitecore.PathAnalyzer.Data.Storage.ITreeDefinitionStorage
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterType) Sitecore.PathAnalyzer.Contracts.ITreeDefinitionService
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterType) Sitecore.PathAnalyzer.Contracts.IMapItemRepository
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterType) Sitecore.PathAnalyzer.Contracts.IMapStatusService
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterType) Sitecore.PathAnalyzer.Contracts.IConfiguration
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterType) Sitecore.SequenceAnalyzer.Configuration.IPruningConfig
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterType) Sitecore.PathAnalyzer.Contracts.IContactReader
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterType) Sitecore.PathAnalyzer.Localization.IResourceManager
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterType) Sitecore.PathAnalyzer.Data.Caching.ICache
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterType) Sitecore.PathAnalyzer.Contracts.ITreeProvider
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterType) Sitecore.PathAnalyzer.Data.SitecoreData.IItemRepository
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterType) Sitecore.PathAnalyzer.Contracts.IMapItemDeploymentManager
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterType) Sitecore.PathAnalyzer.Data.Storage.ITreeStorageManager
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterType) Sitecore.PathAnalyzer.Rules.IRulesValidator

The block above is logged by the class Sitecore.PathAnalyzer.ApplicationContainer, Sitecore.PathAnalyzer. It basically registers the dependencies for Services, Repositories and others as configured in the files \App_Config\Sitecore\PathAnalyzer\Sitecore.PathAnalyzer.config and \App_Config\Sitecore\PathAnalyzer\Sitecore.PathAnalyzer.RemoteClient.config.

Inside the configuration files, you find in the comments what is the responsibility of each class.

image.png

Continuing with the Path Analyzer logs:

27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterModelsForSerialization) Setting serialization info
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterModelsForSerialization) Type 'Sitecore.PathAnalyzer.Data.Models.ExperienceNode, Sitecore.PathAnalyzer' was registered succesfully.
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterModelsForSerialization) Type 'Sitecore.PathAnalyzer.Data.Models.ExperienceTree, Sitecore.PathAnalyzer' was registered succesfully.
27936 17:51:34 INFO  [Path Analyzer](ApplicationContainer.RegisterModelsForSerialization) Type 'Sitecore.PathAnalyzer.Data.Models.PageNode, Sitecore.PathAnalyzer' was registered succesfully.

The block above is still logged by the class Sitecore.PathAnalyzer.ApplicationContainer, Sitecore.PathAnalyzer. It basically registers the dependencies for Models as configured in the files \App_Config\Sitecore\PathAnalyzer\Sitecore.PathAnalyzer.config:

  • Sitecore.PathAnalyzer.Data.Models.ExperienceNode, Sitecore.PathAnalyzer
  • Sitecore.PathAnalyzer.Data.Models.ExperienceTree, Sitecore.PathAnalyzer
  • Sitecore.PathAnalyzer.Data.Models.PageNode, Sitecore.PathAnalyzer

MemoryMonitor

27936 17:51:34 INFO  MemoryMonitor initialized. Threshold: 2 GB. Interval: 00:00:05

MemoryMonitor is a hook implemented by the class Sitecore.Diagnostics.MemoryMonitorHook, Sitecore.Diagnostics. Here’s some of its responsibilities:

  • adjusts the global cache load factor when the memory limit is exceeded
  • clear all caches when the memory limit is exceeded
  • garbage collect when the memory limit is exceeded

It is configured in the \App_Config\Sitecore.config file. The information you see in the log are set in this configuration file.

image.png

This same class is responsible for logging information such as:

Memory usage exceeded the MemoryMonitor threshold. All caches have been cleared.

Memory usage exceeded the MemoryMonitor threshold. Forced GC has been induced.

Memory usage: [number]

Memory used before/after GC: [number] / [number]

The cache load factor have been increased to   [number]. 

Number of suppressed logs due to the minimum time between log entries: [number].

That was it for this post.

Credits

Photo by Nathan Lemon on Unsplash

No Comments Yet