The OOTB ConnectorServer.exe.Config file contains the following <listeners> tag:
<listeners>
<remove name="Default" />
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="c:\connectorserver.log"
traceOutputOptions="DateTime">
<filter type="System.Diagnostics.EventTypeFilter"
initializeData="Information"/>
</add>
</listeners>
This produces a single file in the c: drive. This file can, and does, grow with no way to roll or otherwise start the file over, except to stop the connector server, delete the file, and then restart the connector server.
Instead of using the TextWriterTraceListener, another option can be chosen.
Here is the other option:
<listeners>
<remove name="Default" />
<add name="FileLog"
type="Microsoft.VisualBasic.Logging.FileLogTraceListener,Microsoft.VisualBasic,Version=8.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
initializeData="FileLogWriter"
traceOutputOptions="DateTime"
BaseFileName="ConnectorServer"
Location="Custom"
MaxFileSize="600000000"
CustomLocation="D:\Identity Connectors\Logs\"
LogFileCreationSchedule="Daily">
<filter type="System.Diagnostics.EventTypeFilter" initializeData="Information" />
</add>
</listeners>
You will need to find a way to clean up the log files with an external process. The FileLogTraceListener does not have any options for deleting logs. See these links:
FileLogTraceListener
TraceOutputOptions Values
Good to know, thank you!
ReplyDelete