Converted logging to use log4net.

Changed LogBase to ConsoleBase, which handles console I/O.
This is mostly an in-place conversion, so lots of refactoring can still be done.
This commit is contained in:
Jeff Ames
2008-02-05 19:44:27 +00:00
parent 7a61bcff86
commit 6ed5283bc0
173 changed files with 2175 additions and 1950 deletions

View File

@@ -35,13 +35,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer
{
internal class ScriptEngineLoader
{
private LogBase m_log;
public ScriptEngineLoader(LogBase logger)
{
m_log = logger;
}
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public ScriptServerInterfaces.ScriptEngine LoadScriptEngine(string EngineName)
{
@@ -55,7 +49,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer
}
catch (Exception e)
{
m_log.Error("ScriptEngine",
m_log.Error("[ScriptEngine]: " +
"Error loading assembly \"" + EngineName + "\": " + e.Message + ", " +
e.StackTrace.ToString());
}
@@ -87,7 +81,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer
//}
//catch (Exception e)
//{
// m_log.Error("ScriptEngine", "Error loading assembly \String.Empty + FileName + "\": " + e.ToString());
// m_log.Error("[ScriptEngine]: Error loading assembly \String.Empty + FileName + "\": " + e.ToString());
//}
@@ -104,7 +98,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer
//}
//catch (Exception e)
//{
// m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString());
// m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString());
//}
ScriptServerInterfaces.ScriptEngine ret;
@@ -114,7 +108,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer
//}
//catch (Exception e)
//{
// m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString());
// m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString());
//}
return ret;