---
title: Write log messages
slug: cms-12/docs/logging
docTags: 
createdAt: 2026-08-10T15:55:56.000Z
---

The Logging API shipped with Optimizely (`EPiServer.Logging` namespace) is an abstraction for writing log messages from the system. It merely works as a façade for the logging framework in .NET Core (`Microsoft.Extensions.Logging`). To manage the configuration and output of the logger, refer to the API of the implementing framework, see [Logging in .NET Core](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-5.0).

You should use the logging API defined in .NET Core. Optimizely Content Management System (CMS) uses the same API, so CMS and custom logs are written to the same configured output.

:::hint{type="info"}
**Backwards compatibility**
If you upgrade an existing project that uses the API defined in `EPiServer.Logging`, that will still work because it acts as a façade over the API defined in `Microsoft.Extensions.Logging`. However, for new projects, you should log directly using the `Microsoft.Extensions.Logging` API.
:::
