diff --git a/OpenMetaverse.Http/Logger.cs b/OpenMetaverse.Http/Logger.cs
deleted file mode 100644
index 94ec8040..00000000
--- a/OpenMetaverse.Http/Logger.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2008, openmetaverse.org
- * All rights reserved.
- *
- * - Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * - Neither the name of the openmetaverse.org nor the names
- * of its contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using log4net;
-using log4net.Config;
-
-[assembly: log4net.Config.XmlConfigurator(ConfigFileExtension = "log4net")]
-
-namespace OpenMetaverse.Http
-{
- ///
- /// Singleton logging class for the entire library
- ///
- internal static class Logger
- {
- /// log4net logging engine
- public static ILog Log;
-
- static Logger()
- {
- Log = LogManager.GetLogger(System.Reflection.Assembly.GetExecutingAssembly().FullName);
-
- // If error level reporting isn't enabled we assume no logger is configured and initialize a default
- // ConsoleAppender
- if (!Log.Logger.IsEnabledFor(log4net.Core.Level.Error))
- {
- log4net.Appender.ConsoleAppender appender = new log4net.Appender.ConsoleAppender();
- appender.Layout = new log4net.Layout.PatternLayout("%timestamp [%thread] %-5level - %message%newline");
- BasicConfigurator.Configure(appender);
-
- Log.Info("No log configuration found, defaulting to console logging");
- }
- }
- }
-}
diff --git a/OpenMetaverse.Http/CapsBase.cs b/OpenMetaverse/Capabilities/CapsBase.cs
similarity index 100%
rename from OpenMetaverse.Http/CapsBase.cs
rename to OpenMetaverse/Capabilities/CapsBase.cs
diff --git a/OpenMetaverse.Http/CapsClient.cs b/OpenMetaverse/Capabilities/CapsClient.cs
similarity index 94%
rename from OpenMetaverse.Http/CapsClient.cs
rename to OpenMetaverse/Capabilities/CapsClient.cs
index d5ce74b6..5dec6237 100644
--- a/OpenMetaverse.Http/CapsClient.cs
+++ b/OpenMetaverse/Capabilities/CapsClient.cs
@@ -152,7 +152,7 @@ namespace OpenMetaverse.Http
if (OnDownloadProgress != null)
{
try { OnDownloadProgress(this, bytesReceived, totalBytesToReceive); }
- catch (Exception ex) { Logger.Log.Error(ex.Message, ex); }
+ catch (Exception ex) { Logger.Log(ex.Message, Helpers.LogLevel.Error, ex); }
}
}
@@ -177,7 +177,7 @@ namespace OpenMetaverse.Http
if (callback != null)
{
try { callback(this, result, error); }
- catch (Exception ex) { Logger.Log.Error(ex.Message, ex); }
+ catch (Exception ex) { Logger.Log(ex.Message, Helpers.LogLevel.Error, ex); }
}
_Response = result;
diff --git a/OpenMetaverse.Http/EventQueueClient.cs b/OpenMetaverse/Capabilities/EventQueueClient.cs
similarity index 84%
rename from OpenMetaverse.Http/EventQueueClient.cs
rename to OpenMetaverse/Capabilities/EventQueueClient.cs
index ad16c153..8cf89558 100644
--- a/OpenMetaverse.Http/EventQueueClient.cs
+++ b/OpenMetaverse/Capabilities/EventQueueClient.cs
@@ -89,13 +89,13 @@ namespace OpenMetaverse.Http
_Running = true;
_Request = request;
- Logger.Log.Debug("Capabilities event queue connected");
+ Logger.DebugLog("Capabilities event queue connected");
// The event queue is starting up for the first time
if (OnConnected != null)
{
try { OnConnected(); }
- catch (Exception ex) { Logger.Log.Error(ex.Message, ex); }
+ catch (Exception ex) { Logger.Log(ex.Message, Helpers.LogLevel.Error, ex); }
}
}
@@ -120,8 +120,8 @@ namespace OpenMetaverse.Http
}
else
{
- Logger.Log.Warn("Got an unparseable response from the event queue: \"" +
- System.Text.Encoding.UTF8.GetString(responseData) + "\"");
+ Logger.Log("Got an unparseable response from the event queue: \"" +
+ System.Text.Encoding.UTF8.GetString(responseData) + "\"", Helpers.LogLevel.Warning);
}
}
else if (error != null)
@@ -145,7 +145,7 @@ namespace OpenMetaverse.Http
if (code == HttpStatusCode.NotFound || code == HttpStatusCode.Gone)
{
- Logger.Log.InfoFormat("Closing event queue at {0} due to missing caps URI", _Address);
+ Logger.Log(String.Format("Closing event queue at {0} due to missing caps URI", _Address), Helpers.LogLevel.Info);
_Running = false;
_Dead = true;
@@ -165,18 +165,18 @@ namespace OpenMetaverse.Http
// Try to log a meaningful error message
if (code != HttpStatusCode.OK)
{
- Logger.Log.WarnFormat("Unrecognized caps connection problem from {0}: {1}",
- _Address, code);
+ Logger.Log(String.Format("Unrecognized caps connection problem from {0}: {1}",
+ _Address, code), Helpers.LogLevel.Warning);
}
else if (error.InnerException != null)
{
- Logger.Log.WarnFormat("Unrecognized internal caps exception from {0}: {1}",
- _Address, error.InnerException.Message);
+ Logger.Log(String.Format("Unrecognized internal caps exception from {0}: {1}",
+ _Address, error.InnerException.Message), Helpers.LogLevel.Warning);
}
else
{
- Logger.Log.WarnFormat("Unrecognized caps exception from {0}: {1}",
- _Address, error.Message);
+ Logger.Log(String.Format("Unrecognized caps exception from {0}: {1}",
+ _Address, error.Message), Helpers.LogLevel.Warning);
}
}
@@ -186,7 +186,7 @@ namespace OpenMetaverse.Http
{
++_errorCount;
- Logger.Log.Warn("No response from the event queue but no reported error either");
+ Logger.Log("No response from the event queue but no reported error either", Helpers.LogLevel.Warning);
}
HandlingDone:
@@ -215,7 +215,7 @@ namespace OpenMetaverse.Http
if (_Dead)
{
_Running = false;
- Logger.Log.Debug("Sent event queue shutdown message");
+ Logger.DebugLog("Sent event queue shutdown message");
}
}
@@ -232,7 +232,7 @@ namespace OpenMetaverse.Http
OSDMap body = (OSDMap)evt["body"];
try { OnEvent(msg, body); }
- catch (Exception ex) { Logger.Log.Error(ex.Message, ex); }
+ catch (Exception ex) { Logger.Log(ex.Message, Helpers.LogLevel.Error, ex); }
}
}
diff --git a/prebuild.xml b/prebuild.xml
index d223edaa..d24a862d 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -99,30 +99,6 @@
-
-
-
- ../bin/
-
-
-
-
- ../bin/
- OpenMetaverse.Http.XML
-
-
-
- ../bin/
-
-
-
-
-
-
-
-
-
-
@@ -144,7 +120,6 @@
-
@@ -173,7 +148,6 @@
-
@@ -222,7 +196,6 @@
-
@@ -401,7 +374,6 @@
-
@@ -560,7 +532,6 @@
-
@@ -615,7 +586,6 @@
-
@@ -804,7 +774,6 @@
-