mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 13:55:35 +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:
@@ -51,9 +51,9 @@ namespace SimpleApp
|
||||
private string m_userPlugin = "OpenSim.Framework.Data.SQLite.dll";
|
||||
private string m_inventoryPlugin = "OpenSim.Framework.Data.SQLite.dll";
|
||||
|
||||
protected override LogBase CreateLog()
|
||||
protected override ConsoleBase CreateConsole()
|
||||
{
|
||||
return new LogBase(null, "SimpleApp", this, true);
|
||||
return new ConsoleBase("SimpleApp", this);
|
||||
}
|
||||
|
||||
protected override void Initialize()
|
||||
@@ -64,12 +64,12 @@ namespace SimpleApp
|
||||
|
||||
LocalAssetServer assetServer = new LocalAssetServer();
|
||||
|
||||
m_assetCache = new AssetCache(assetServer, m_log);
|
||||
m_assetCache = new AssetCache(assetServer);
|
||||
}
|
||||
|
||||
public void Run()
|
||||
{
|
||||
StartLog();
|
||||
StartConsole();
|
||||
StartUp();
|
||||
|
||||
LocalInventoryService inventoryService = new LocalInventoryService();
|
||||
@@ -94,7 +94,7 @@ namespace SimpleApp
|
||||
|
||||
m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod);
|
||||
|
||||
m_log.Notice(m_log.LineInfo);
|
||||
m_console.Notice(m_console.LineInfo);
|
||||
|
||||
IPEndPoint internalEndPoint =
|
||||
new IPEndPoint(IPAddress.Parse("127.0.0.1"), (int) m_networkServersInfo.HttpListenerPort);
|
||||
@@ -104,7 +104,7 @@ namespace SimpleApp
|
||||
|
||||
UDPServer udpServer;
|
||||
|
||||
m_moduleLoader = new ModuleLoader(m_log, m_config);
|
||||
m_moduleLoader = new ModuleLoader(m_config);
|
||||
m_moduleLoader.LoadDefaultSharedModules();
|
||||
|
||||
Scene scene = SetupScene(regionInfo, out udpServer, false);
|
||||
@@ -170,8 +170,8 @@ namespace SimpleApp
|
||||
scene.AddEntity(fileObject);
|
||||
}
|
||||
|
||||
m_log.Notice("Press enter to quit.");
|
||||
m_log.ReadLine();
|
||||
m_console.Notice("Press enter to quit.");
|
||||
m_console.ReadLine();
|
||||
}
|
||||
|
||||
protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager,
|
||||
@@ -182,7 +182,7 @@ namespace SimpleApp
|
||||
return
|
||||
new MyWorld(regionInfo, circuitManager, permissionManager, m_commsManager, sceneGridService,
|
||||
m_assetCache, storageManager, m_httpServer,
|
||||
new ModuleLoader(m_log, m_config), true, false);
|
||||
new ModuleLoader(m_config), true, false);
|
||||
}
|
||||
|
||||
protected override StorageManager CreateStorageManager(string connectionstring)
|
||||
@@ -211,6 +211,8 @@ namespace SimpleApp
|
||||
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
Program app = new Program();
|
||||
|
||||
app.Run();
|
||||
|
||||
Reference in New Issue
Block a user