By default the agent will log warnings and errors but if you are having problems with the agent not reporting certain metrics or with your plugins, you can enable debug mode which will log every action the agent takes.
1. Browse to the agent directory
Browse to the Server Density directory. This is usually C:\Program Files (x86)\Boxed Ice\Server Density
.
2. Open debug config
Open BoxedIce.ServerDensity.Agent.WindowsService.exe.config
3. Set up a debug logger
Within the <configsections> node, ensure that the following exists, if it doesn't add it:
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"></section>
Check if the log4net
section already exists, and replace it with the following. If it doesn't exist add the following into the <configuration> node:
<log4net>
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%ndc] -
%message%newline" />
</layout>
</appender>
<appender name="FileAppender" type="log4net.Appender.FileAppender">
<file value="log-file.txt" />
<appendToFile value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger
[%property{NDC}] - %message%newline" />
</layout>
</appender>
<root>
<level value="ALL" />
<appender-ref ref="ConsoleAppender" />
<appender-ref ref="FileAppender" />
</root>
</log4net>
4. Save the changes
Save the changes. The log file will be created in this directory as log-file.txt.
Comments