mirror of
https://github.com/opensim/opensim.git
synced 2026-06-25 15:55:46 +08:00
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:
@@ -33,14 +33,12 @@ namespace OpenSim.Grid.ScriptServer
|
||||
// Maintains connection and communication to a region
|
||||
public class RegionConnectionManager : RegionBase
|
||||
{
|
||||
private LogBase m_log;
|
||||
private ScriptServerMain m_ScriptServerMain;
|
||||
private object m_Connection;
|
||||
|
||||
public RegionConnectionManager(ScriptServerMain scm, LogBase logger, object Connection)
|
||||
public RegionConnectionManager(ScriptServerMain scm, object Connection)
|
||||
{
|
||||
m_ScriptServerMain = scm;
|
||||
m_log = logger;
|
||||
m_Connection = Connection;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,13 +38,11 @@ namespace OpenSim.Grid.ScriptServer
|
||||
|
||||
private List<RegionConnectionManager> Regions = new List<RegionConnectionManager>();
|
||||
|
||||
private LogBase m_log;
|
||||
private ScriptServerMain m_ScriptServerMain;
|
||||
|
||||
public RegionCommManager(ScriptServerMain scm, LogBase logger)
|
||||
public RegionCommManager(ScriptServerMain scm)
|
||||
{
|
||||
m_ScriptServerMain = scm;
|
||||
m_log = logger;
|
||||
}
|
||||
|
||||
~RegionCommManager()
|
||||
@@ -96,9 +94,8 @@ namespace OpenSim.Grid.ScriptServer
|
||||
// ~ ask scriptengines if they will accept script?
|
||||
// - Add script to shared communication channel towards that region
|
||||
|
||||
|
||||
// TODO: FAKING A CONNECTION
|
||||
Regions.Add(new RegionConnectionManager(m_ScriptServerMain, m_log, null));
|
||||
Regions.Add(new RegionConnectionManager(m_ScriptServerMain, null));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -34,17 +34,15 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer
|
||||
{
|
||||
internal class ScriptEngineManager
|
||||
{
|
||||
private LogBase m_log;
|
||||
private ScriptEngineLoader ScriptEngineLoader;
|
||||
private List<ScriptServerInterfaces.ScriptEngine> scriptEngines = new List<ScriptServerInterfaces.ScriptEngine>();
|
||||
private ScriptServerMain m_ScriptServerMain;
|
||||
|
||||
// Initialize
|
||||
public ScriptEngineManager(ScriptServerMain scm, LogBase logger)
|
||||
public ScriptEngineManager(ScriptServerMain scm)
|
||||
{
|
||||
m_ScriptServerMain = scm;
|
||||
m_log = logger;
|
||||
ScriptEngineLoader = new ScriptEngineLoader(m_log);
|
||||
ScriptEngineLoader = new ScriptEngineLoader();
|
||||
}
|
||||
|
||||
~ScriptEngineManager()
|
||||
|
||||
Reference in New Issue
Block a user