The license is LGPL, so I don't know exactly how that works. To avoid any
licensing issues, I release the following blurb of code that I designed and
wrote by myself to the public domain:
public interface ILogWriter
{
void Debug(object source, string message);
void Debug(object source, string message, Exception exception);
void Info(object source, string message);
void Info(object source, string message, Exception exception);
void Warn(object source, string message);
void Warn(object source, string message, Exception exception);
void Error(object source, string message);
void Error(object source, string message, Exception exception);
void Fatal(object source, string message);
void Fatal(object source, string message, Exception exception);
}
The implementation for null and console should be straightforward. The only
other helpful addition I've found is to use the
StackTrace/StackFrame.GetMethod().Name inside an #if DEBUG conditional to print
out a full stack trace for anything above info or warn.
John
>-----Original Message-----
>From: [email protected] [mailto:opensim-dev-
>[email protected]] On Behalf Of Tommi Laukkanen
>Sent: Monday, February 23, 2009 11:44 AM
>To: [email protected]
>Subject: Re: [Opensim-dev] MXPClient?
>
>Thanks John, sounds perfect. Is the license such that I can copy their
>implementation directly?
>
>regards,
>Tommi
>
>
>On Mon, Feb 23, 2009 at 9:38 PM, Hurliman, John
><[email protected]> wrote:
>
>
> Take a look at how C# WebServer handles logging (ILogWriter.cs in
>http://www.codeplex.com/webserver/SourceControl/changeset/view/18488). A
>simple interface is defined for logging, and default console and null
>loggers are provided. Developers using the library in their own
>applications can implement the class and hook it up to log4net, .NET
>trace logging, etc. without MXP.dll having to drag any dependencies
>around. This is the best balance between ease of use and clean
>separation of dependencies that I've found for C# logging so far.
>
>
> John
>
> >-----Original Message-----
> >From: [email protected] [mailto:opensim-dev-
>
> >[email protected]] On Behalf Of Tommi Laukkanen
> >Sent: Monday, February 23, 2009 11:21 AM
> >To: [email protected]
> >Subject: Re: [Opensim-dev] MXPClient?
> >
>
> >I added prebuild support to MXP library so you can build MXP.dll
>with
> >mono and nant now. I also removed Action<> class dependency. I
>will take
> >a look at log4net support next.
> >
> >
>
> _______________________________________________
> Opensim-dev mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>
>
_______________________________________________
Opensim-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-dev