From 6ed5283bc06a62f38eb517e67b975832b603bf61 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 5 Feb 2008 19:44:27 +0000 Subject: 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. --- OpenSim/Region/ClientStack/RegionApplicationBase.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/ClientStack/RegionApplicationBase.cs') 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 { public abstract class RegionApplicationBase : BaseOpenSimServer { + private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + protected AssetCache m_assetCache; protected Dictionary m_clientCircuits = new Dictionary(); protected NetworkServersInfo m_networkServersInfo; @@ -75,19 +77,20 @@ namespace OpenSim.Region.ClientStack m_httpServer = new BaseHttpServer(m_httpServerPort); - m_log.Status("REGION", "Starting HTTP server"); + m_log.Info("[REGION]: Starting HTTP server"); + m_httpServer.Start(); } protected abstract void Initialize(); - protected void StartLog() + protected void StartConsole() { - m_log = CreateLog(); - MainLog.Instance = m_log; + m_console = CreateConsole(); + MainConsole.Instance = m_console; } - protected abstract LogBase CreateLog(); + protected abstract ConsoleBase CreateConsole(); protected abstract PhysicsScene GetPhysicsScene(); protected abstract StorageManager CreateStorageManager(string connectionstring); @@ -107,7 +110,7 @@ namespace OpenSim.Region.ClientStack // listenIP = IPAddress.Parse("0.0.0.0"); uint port = (uint) regionInfo.InternalEndPoint.Port; - udpServer = new UDPServer(listenIP, ref port, regionInfo.m_allow_alternate_ports, m_assetCache, m_log, circuitManager); + udpServer = new UDPServer(listenIP, ref port, regionInfo.m_allow_alternate_ports, m_assetCache, circuitManager); regionInfo.InternalEndPoint.Port = (int)port; Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager); @@ -136,12 +139,12 @@ namespace OpenSim.Region.ClientStack if (masterAvatar != null) { - m_log.Verbose("PARCEL", "Found master avatar [" + masterAvatar.UUID.ToString() + "]"); + m_log.Info("[PARCEL]: Found master avatar [" + masterAvatar.UUID.ToString() + "]"); scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; } else { - m_log.Verbose("PARCEL", "No master avatar found, using null."); + m_log.Info("[PARCEL]: No master avatar found, using null."); scene.RegionInfo.MasterAvatarAssignedUUID = LLUUID.Zero; } -- cgit v1.1