# Turn on authentication logging

> important **IMPORTANT**: You must turn on logging, only if you need to investigate a problem. This feature generates substantial amounts of data and you should turn it off, when you do not use it.

## Turn on authentication logging

To this, perform the following:

1. Navigate to *Administration » Settings* » *Advanced » Authentication*.
2. Select *Enable logging* checkbox.
3. Save your changes.

In case you are unable to access your website backend (for example due to authentication problems), you can manually enable authentication logging for troubleshootign purposes. To do that, you'll need to edit your Sitefinity CMS configuration files, so please proceed with the followign steps with caution:

1. Edit the`~/App_Data/Sitefinity/Configuration/AuthenticationConfig.config file`
2. Set *enableLogging="True"* in the `authenticationConfig`tag:
   ```XML
   <?xml version="1.0" encoding="utf-8"?>
   <authenticationConfig xmlns:config="urn:telerik:sitefinity:configuration" xmlns:type="urn:telerik:sitefinity:configuration:type" config:version="15.0.8200.0" enableLogging="True">
   </authenticationConfig>
   ```

The log information is available in the `Authentication.log` file, located in your project’s `~\App_Data\Sitefinity\Logs` folder.

## Change the default logger

To change the default logger, perform the following:

1. Override the current `SitefinityStsLogProvider` or implement custom `IdentityServer3.Core.Logging.ILogProvider`
2. Register the provider in the `ObjectFactory`, in the following way:\
   `ObjectFactory.Container.RegisterInstance<IdentityServer3.Core.Logging.ILogProvider>(new MyLogger());`
