diff options
author | Jeff Ames | 2008-02-05 19:44:27 +0000 |
---|---|---|
committer | Jeff Ames | 2008-02-05 19:44:27 +0000 |
commit | 6ed5283bc06a62f38eb517e67b975832b603bf61 (patch) | |
tree | e5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Region/ClientStack/RegionApplicationBase.cs | |
parent | Cut down on the number of packets sent during terraforming. Terraforming shou... (diff) | |
download | opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.zip opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2 opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/ClientStack/RegionApplicationBase.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/RegionApplicationBase.cs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 72917d1..8a042b1 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Region.ClientStack | |||
42 | { | 42 | { |
43 | public abstract class RegionApplicationBase : BaseOpenSimServer | 43 | public abstract class RegionApplicationBase : BaseOpenSimServer |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | protected AssetCache m_assetCache; | 47 | protected AssetCache m_assetCache; |
46 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); | 48 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); |
47 | protected NetworkServersInfo m_networkServersInfo; | 49 | protected NetworkServersInfo m_networkServersInfo; |
@@ -75,19 +77,20 @@ namespace OpenSim.Region.ClientStack | |||
75 | 77 | ||
76 | m_httpServer = new BaseHttpServer(m_httpServerPort); | 78 | m_httpServer = new BaseHttpServer(m_httpServerPort); |
77 | 79 | ||
78 | m_log.Status("REGION", "Starting HTTP server"); | 80 | m_log.Info("[REGION]: Starting HTTP server"); |
81 | |||
79 | m_httpServer.Start(); | 82 | m_httpServer.Start(); |
80 | } | 83 | } |
81 | 84 | ||
82 | protected abstract void Initialize(); | 85 | protected abstract void Initialize(); |
83 | 86 | ||
84 | protected void StartLog() | 87 | protected void StartConsole() |
85 | { | 88 | { |
86 | m_log = CreateLog(); | 89 | m_console = CreateConsole(); |
87 | MainLog.Instance = m_log; | 90 | MainConsole.Instance = m_console; |
88 | } | 91 | } |
89 | 92 | ||
90 | protected abstract LogBase CreateLog(); | 93 | protected abstract ConsoleBase CreateConsole(); |
91 | protected abstract PhysicsScene GetPhysicsScene(); | 94 | protected abstract PhysicsScene GetPhysicsScene(); |
92 | protected abstract StorageManager CreateStorageManager(string connectionstring); | 95 | protected abstract StorageManager CreateStorageManager(string connectionstring); |
93 | 96 | ||
@@ -107,7 +110,7 @@ namespace OpenSim.Region.ClientStack | |||
107 | // listenIP = IPAddress.Parse("0.0.0.0"); | 110 | // listenIP = IPAddress.Parse("0.0.0.0"); |
108 | 111 | ||
109 | uint port = (uint) regionInfo.InternalEndPoint.Port; | 112 | uint port = (uint) regionInfo.InternalEndPoint.Port; |
110 | udpServer = new UDPServer(listenIP, ref port, regionInfo.m_allow_alternate_ports, m_assetCache, m_log, circuitManager); | 113 | udpServer = new UDPServer(listenIP, ref port, regionInfo.m_allow_alternate_ports, m_assetCache, circuitManager); |
111 | regionInfo.InternalEndPoint.Port = (int)port; | 114 | regionInfo.InternalEndPoint.Port = (int)port; |
112 | 115 | ||
113 | Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager); | 116 | Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager); |
@@ -136,12 +139,12 @@ namespace OpenSim.Region.ClientStack | |||
136 | 139 | ||
137 | if (masterAvatar != null) | 140 | if (masterAvatar != null) |
138 | { | 141 | { |
139 | m_log.Verbose("PARCEL", "Found master avatar [" + masterAvatar.UUID.ToString() + "]"); | 142 | m_log.Info("[PARCEL]: Found master avatar [" + masterAvatar.UUID.ToString() + "]"); |
140 | scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; | 143 | scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; |
141 | } | 144 | } |
142 | else | 145 | else |
143 | { | 146 | { |
144 | m_log.Verbose("PARCEL", "No master avatar found, using null."); | 147 | m_log.Info("[PARCEL]: No master avatar found, using null."); |
145 | scene.RegionInfo.MasterAvatarAssignedUUID = LLUUID.Zero; | 148 | scene.RegionInfo.MasterAvatarAssignedUUID = LLUUID.Zero; |
146 | } | 149 | } |
147 | 150 | ||