I have Enterprise Library Logging used throughout my project which is working perfectly, however I have noticed that the folder containing the logs has started to become bloated with old logs that are no longer needed. My set up in app.config is:
<add name="CommonListener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="D:\Logs\Common.log" footer=" "
formatter="Text Formatter" header=" " rollFileExistsBehavior="Increment"
rollInterval="Midnight" rollSizeKB="1000000"/>
At present I am able to delete these manually, but that will lead to problems down the line as I won't have access to where they will be stored. Is there a configuration that I can add into the config file that will flag them to be deleted after 'x' amount of days?