The link in my previous post described how to make log4net communicate
with Chainsaw over UDP. If you don't want to do that you can create an
appender in log4net that uses the following layout:

 <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
  <locationInfo value="true" />
 </layout>

In Chainsaw there is a tab at the bottom of the screen that says:

 Drag & Drop log files here

You should be able to drag your file onto that tab and Chainsaw should
parse it. If for some reason you don't like the XmlLayoutSchemaLog4j
format, here is a very simple custom log4net layout and its
corresponding Chainsaw plugin:

 <!-- change your log4net appender to use this layout -->
 <layout type="log4net.Layout.PatternLayout, log4net">
  <conversionPattern value="%p - %m%n" />
 </layout>

 <!-- include this in your chainsaw config file -->
 <plugin name="logFileReceiver"  
class="org.apache.log4j.varia.LogFilePatternReceiver">
  <param name="fileURL" value="file:///c:/LogfileForChainsaw.txt" />
  <param name="logFormat" value="LEVEL - MESSAGE"/> 
 </plugin>

Once you have that working, you can play around with adding more
fields.

- Ron 

--- Ron Grabowski <[EMAIL PROTECTED]> wrote:
> http://tinyurl.com/6oz6y
> http://marc.theaimsgroup.com/?l=log4net-user&m=110816680703194&w=4
> 
> --- Owen Corpening <[EMAIL PROTECTED]> wrote:
> > I am using this appender:
> > 
> >                         <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="%d [%t] %-5p %c [%x] - %m%n"/>
> > 
> >                                     </layout>
> > 
> >                         </appender>
> > 
> >  
> > 
> > I do file-load-log4j file but nothing seems to happen 
> > 
> >  
> > 
> > Thanks,
> > 
> >  
> > 
> > Owen Corpening
> > 
> > Acorn Systems
> 

Reply via email to