diff options
author | justincc | 2009-12-16 16:47:28 +0000 |
---|---|---|
committer | justincc | 2009-12-16 16:47:28 +0000 |
commit | ec6017c92b26976b727fa364e57759f6f44174ef (patch) | |
tree | ff3346ecef842a516795086e946aafcf40bdfe96 | |
parent | Revert "Switch on HttpServer_OpenSim.dll logging temporarily" (diff) | |
download | opensim-SC-ec6017c92b26976b727fa364e57759f6f44174ef.zip opensim-SC-ec6017c92b26976b727fa364e57759f6f44174ef.tar.gz opensim-SC-ec6017c92b26976b727fa364e57759f6f44174ef.tar.bz2 opensim-SC-ec6017c92b26976b727fa364e57759f6f44174ef.tar.xz |
Turn on HttpServer_OpenSim.dll logging temporarily
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 3d6051d..8eeb067 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -40,7 +40,8 @@ using HttpServer; | |||
40 | using log4net; | 40 | using log4net; |
41 | using Nwc.XmlRpc; | 41 | using Nwc.XmlRpc; |
42 | using OpenMetaverse.StructuredData; | 42 | using OpenMetaverse.StructuredData; |
43 | using CoolHTTPListener = HttpServer.HttpListener; | 43 | using CoolHTTPListener = HttpServer.HttpListener; |
44 | using CoolHttpServer = HttpServer; | ||
44 | using HttpListener=System.Net.HttpListener; | 45 | using HttpListener=System.Net.HttpListener; |
45 | 46 | ||
46 | namespace OpenSim.Framework.Servers.HttpServer | 47 | namespace OpenSim.Framework.Servers.HttpServer |
@@ -729,12 +730,12 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
729 | xmlRpcResponse = method(xmlRprcRequest, request.RemoteIPEndPoint); | 730 | xmlRpcResponse = method(xmlRprcRequest, request.RemoteIPEndPoint); |
730 | } | 731 | } |
731 | catch(Exception e) | 732 | catch(Exception e) |
732 | { | 733 | { |
733 | string errorMessage | 734 | string errorMessage |
734 | = String.Format( | 735 | = String.Format( |
735 | "Requested method [{0}] from {1} threw exception: {2} {3}", | 736 | "Requested method [{0}] from {1} threw exception: {2} {3}", |
736 | methodName, request.RemoteIPEndPoint.Address, e.Message, e.StackTrace); | 737 | methodName, request.RemoteIPEndPoint.Address, e.Message, e.StackTrace); |
737 | 738 | ||
738 | m_log.ErrorFormat("[BASE HTTP SERVER]: {0}", errorMessage); | 739 | m_log.ErrorFormat("[BASE HTTP SERVER]: {0}", errorMessage); |
739 | 740 | ||
740 | // if the registered XmlRpc method threw an exception, we pass a fault-code along | 741 | // if the registered XmlRpc method threw an exception, we pass a fault-code along |
@@ -1819,34 +1820,32 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1819 | /// There is also a UseTraceLogs line in this file that can be uncommented for more detailed log information | 1820 | /// There is also a UseTraceLogs line in this file that can be uncommented for more detailed log information |
1820 | public class HttpServerLogWriter : ILogWriter | 1821 | public class HttpServerLogWriter : ILogWriter |
1821 | { | 1822 | { |
1822 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 1823 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
1823 | 1824 | ||
1824 | public void Write(object source, LogPrio priority, string message) | 1825 | public void Write(object source, LogPrio priority, string message) |
1825 | { | 1826 | { |
1826 | /* | ||
1827 | switch (priority) | 1827 | switch (priority) |
1828 | { | 1828 | { |
1829 | case HttpServer.LogPrio.Debug: | 1829 | case CoolHttpServer.LogPrio.Debug: |
1830 | m_log.DebugFormat("[{0}]: {1}", source.ToString(), message); | 1830 | m_log.DebugFormat("[{0}]: {1}", source.ToString(), message); |
1831 | break; | 1831 | break; |
1832 | case HttpServer.LogPrio.Error: | 1832 | case CoolHttpServer.LogPrio.Error: |
1833 | m_log.ErrorFormat("[{0}]: {1}", source.ToString(), message); | 1833 | m_log.ErrorFormat("[{0}]: {1}", source.ToString(), message); |
1834 | break; | 1834 | break; |
1835 | case HttpServer.LogPrio.Info: | 1835 | case CoolHttpServer.LogPrio.Info: |
1836 | m_log.InfoFormat("[{0}]: {1}", source.ToString(), message); | 1836 | m_log.InfoFormat("[{0}]: {1}", source.ToString(), message); |
1837 | break; | 1837 | break; |
1838 | case HttpServer.LogPrio.Warning: | 1838 | case CoolHttpServer.LogPrio.Warning: |
1839 | m_log.WarnFormat("[{0}]: {1}", source.ToString(), message); | 1839 | m_log.WarnFormat("[{0}]: {1}", source.ToString(), message); |
1840 | break; | 1840 | break; |
1841 | case HttpServer.LogPrio.Fatal: | 1841 | case CoolHttpServer.LogPrio.Fatal: |
1842 | m_log.ErrorFormat("[{0}]: FATAL! - {1}", source.ToString(), message); | 1842 | m_log.ErrorFormat("[{0}]: FATAL! - {1}", source.ToString(), message); |
1843 | break; | 1843 | break; |
1844 | default: | 1844 | default: |
1845 | break; | 1845 | break; |
1846 | } | 1846 | } |
1847 | */ | ||
1848 | 1847 | ||
1849 | return; | 1848 | return; |
1850 | } | 1849 | } |
1851 | } | 1850 | } |
1852 | } | 1851 | } \ No newline at end of file |