[Opensim-dev] MXPClient?

Hurliman, John john.hurliman at intel.com
Mon Feb 23 20:53:12 UTC 2009


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: opensim-dev-bounces at lists.berlios.de [mailto:opensim-dev-
>bounces at lists.berlios.de] On Behalf Of Tommi Laukkanen
>Sent: Monday, February 23, 2009 11:44 AM
>To: opensim-dev at lists.berlios.de
>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
><john.hurliman at intel.com> 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: opensim-dev-bounces at lists.berlios.de [mailto:opensim-dev-
>
>	>bounces at lists.berlios.de] On Behalf Of Tommi Laukkanen
>	>Sent: Monday, February 23, 2009 11:21 AM
>	>To: opensim-dev at lists.berlios.de
>	>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
>	Opensim-dev at lists.berlios.de
>	https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>

> 



More information about the Opensim-dev mailing list