Open Source .NET Development [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Open Source .NET Development [Electronic resources] - نسخه متنی

Brian Nantz

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


Log File Readers


Using 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.

LogFactor5


LogFactor5 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]

Using the ConversionPattern and FileAppender in Listing 8.21 will format the logfile so that LogFactor5 will work with it.

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 Client


If 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]

Chainsaw


Chainsaw (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]

Chainsaw supports the following configurations:

UDPAppender
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.


    / 275