This is related to Sitecore logging using log4net in Azure.
Current Behavior:
Below are the three screenshots:
The log4net related setting just for azure
The only change which I have added at the moment.
Multiple files created for 20 Oct(i.e today) and last night file with weird name.
Expected behavior: I want to log one file for each day irrespective of the number of restarts/application pool recycle with the date in the name of the file.
An update please, this error got resolved after I used the below code to resolve:
<appender name="AzureFallbackAppender">
<rollingStyle>
<patch:attribute name="value">Date</patch:attribute>
</rollingStyle>
<maximumFileSize>
<patch:attribute name="value">50MB</patch:attribute>
</maximumFileSize>
<staticLogFileName>
<patch:attribute name="value">false</patch:attribute>
</staticLogFileName>
<preserveLogFileNameExtension>
<patch:attribute name="value">true</patch:attribute>
</preserveLogFileNameExtension>
<file>
<patch:attribute name="value">D:\home\site\wwwroot\App_Data/logs/{machineName}/azure.log.{date}.{time}.txt</patch:attribute>
</file>
<appendToFile>
<patch:attribute name="value">true</patch:attribute>
</appendToFile>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern>
<patch:attribute name="value">%4t %d - %-5p %m%n%n%n</patch:attribute>
</conversionPattern>
</layout>
</appender>