0

Does anyone know whether it`s possible to get from the logs whether Sitecore is rendering a personalized view? I mean I know we can check the output by looking at the site but wondering whether Sitecore capture it on logs or not.

3

No, not OOTB as far as I know. I just had a quick look at the Sitecore Kernel Assembly.

Normally, the rules need to get triggered when rendering the item. So, I checked the following namespace: Sitecore.Pipelines.InsertRenderings.Processors.EvaluateConditions from the Sitecore.Kernel.dll and there seems to be no log found in it.

Though, you can have a custom pipeline of the Evaluation of the conditions, that is, you patch the processor

<processor type="Sitecore.Pipelines.InsertRenderings.Processors.EvaluateConditions, Sitecore.Kernel"/>

Then, you may write up some logs in your custom processor.. An example snippet is shown below

public class CustomCondtionEvaluation: EvaluateConditions
{
    protected override void Evaluate(InsertRenderingsArgs args, Item item)
    {
        //Add logs and custom logic if required here            
    }
} 

Then you have to override the Run method which triggers the evaluation of the rule which is at the namespace Sitecore.Rules.RuleList<T>. This is where the logs should be written. There are only logs when an error occured

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.