[Mono-dev] XSP debugging
Marek Habersack
grendel at caudium.net
Wed Nov 16 17:43:27 EST 2005
On Wed, Nov 16, 2005 at 11:00:05AM -0600, Carlos Solorzano scribbled:
> Whats the easiest way to do some debugging of XSP, is there a way to
> turn on logs for XSP?
personally I use log4net (catches also Console.Write/WriteLine) with the
following config:
<?xml version="1.0" encoding="utf-8" ?>
<log4net debug="false">
<appender name="LogFileAppender" type="log4net.Appender.FileAppender" >
<file value="logs/app-log.txt" />
<appendToFile value="false" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %-5level %logger - %message%newline" />
</layout>
</appender>
<appender name="HttpTraceAppender" type="log4net.Appender.AspNetTraceAppender" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %-5level %logger - %message%newline" />
</layout>
</appender>
<appender name="HttpTraceAppender" type="log4net.Appender.AspNetTraceAppender" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %-5level %logger - %message%newline" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="ConsoleAppender" />
<appender-ref ref="LogFileAppender" />
<appender-ref ref="HttpTraceAppender" />
</root>
</log4net>
And the following attribute somewhere in your main assembly:
[assembly: log4net.Config.XmlConfigurator(ConfigFileExtension="log4net", Watch=true)]
With this config, your log4net config file should be named YourMainAssembly.dll.log4net
and should be put in the root directory of your application.
You can get log4net from http://logging.apache.org/log4net/
hope that helps, regards
marek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20051116/b4a3129f/attachment.bin
More information about the Mono-devel-list
mailing list