Log File ReadersUsing a standard Logger, as opposed to creating your own custom logging, has great advantages. The Open Source community has created two Logfile Reading Applications that can be used with Log4Net. LogFactor5LogFactor5 is a Java application that is a part of the Log4J distribution. You can download it at http://jakarta.apache.org/log4j/docs/lf5/overviewl. Figure 8-4 shows what LogFactor5 looks like. Figure 8-4. LogFactor5 User Interface.[View full size image] ![]() Listing 8.21. LogFactor5 using PatternLayout<appender name="FileAppender" type="log4net.Appender.FileAppender"> <param name="File" value="log-file.txt" /> <param name="AppendToFile" value="true" /> <layout type="log4net.Layout.PatternLayout"> <param name="ConversionPattern" value="[slf5s.start]%d{DATE}[slf5s.DATE]%n\%p[slf5s.PRIORITY]%n%x[slf5s .NDC]%n%t[slf5s.THREAD]%n%c[slf5s.CATEGORY]%n\%l[slf5s.LOCATION]%n%m[sl f5s.MESSAGE]%n%n" /> </layout> </appender> LogFactor5 is not very actively developed compared to Chainsaw. Network Log ClientIf a C# application suits you better, there is an Open Source project that will listen for input from Log4Net's UdpAppender.Network Log Client (http://sourceforge.net/projects/netlogclient/) is a simple but effective graphical viewer for logged messages, as shown in Figure 8-5. Figure 8-5. Network Log Client.[View full size image] ![]() ChainsawChainsaw (Figure 8-6) is another Java application that can be used to read log files. This application can be downloaded from http://sourceforge.net/projects/logui or as part of the Log4J package. Figure 8-6. Chainsaw.[View full size image] ![]() By default Chainsaw uses port 4445.XMLLayout Format As shown in Listing 8.6.Chainsaw is being actively developed and is a nice cross-platform user interface log reader that gathers information from multiple clients nicely. |