Configure the log file size
Abstract
How to configure the maximum file size for extended xConnect logs.
When you have enabled the extended xConnect logging feature, the size of log files can grow dramatically. It can affect the overall xConnect performance and slow it down. We recommend that you configure the maximum size of log files to avoid slow xConnect performance. xConnect automatically creates new log files when it reaches the file size limit.
To configure the maximum size of log files:
Open the
\App_Data\config\Sitecore\CoreServices\sc.Serilog.xml
file and add the following nodes under theSettings/Serilog/WriteTo/FileSink/Args
section:<rollingInterval>Day</rollingInterval> <rollOnFileSizeLimit>True</rollOnFileSizeLimit> <fileSizeLimitBytes>52428800</fileSizeLimitBytes>
For example:
<WriteTo> <FileSink> <Name>RollingFile</Name> <Args> <pathFormat>App_Data\\Logs\\xconnect-log-${MachineName}-${InstanceName}-{Date}.txt</pathFormat> <retainedFileCountLimit>7</retainedFileCountLimit> <buffered>False</buffered> <rollingInterval>Day</rollingInterval> <rollOnFileSizeLimit>True</rollOnFileSizeLimit> <fileSizeLimitBytes>52428800</fileSizeLimitBytes> </Args> </FileSink> </WriteTo>