HomeDev GuideRecipesAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Write log messages

Use the .NET Core logging API to write consistent log messages from Optimizely CMS 13 and custom application code.

Write log messages through the .NET Core Microsoft.Extensions.Logging API to keep CMS and custom application logs in a single, consistent output. Optimizely CMS 13 uses this API, so all logs flow to the same configured destination.

The EPiServer.Logging namespace provides a facade over Microsoft.Extensions.Logging. To manage logger configuration and output, go to Logging in .NET Core.

📘

Backward compatibility

Existing projects that use the EPiServer.Logging API continue to work because the API acts as a facade over Microsoft.Extensions.Logging. For new projects, log directly through the Microsoft.Extensions.Logging API.