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/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | |
parent | Cut down on the number of packets sent during terraforming. Terraforming shou... (diff) | |
download | opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.zip opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2 opensim-SC_OLD-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 '')
-rw-r--r-- | OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index 4c1c1d2..3cd918c 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | |||
@@ -40,19 +40,21 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
40 | [Extension("/OpenSim/Startup")] | 40 | [Extension("/OpenSim/Startup")] |
41 | public class LoadRegionsPlugin : IApplicationPlugin | 41 | public class LoadRegionsPlugin : IApplicationPlugin |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
43 | public void Initialise(OpenSimMain openSim) | 45 | public void Initialise(OpenSimMain openSim) |
44 | { | 46 | { |
45 | MainLog.Instance.Notice("LOADREGIONS", "Load Regions addin being initialised"); | 47 | m_log.Info("[LOADREGIONS]: Load Regions addin being initialised"); |
46 | 48 | ||
47 | IRegionLoader regionLoader; | 49 | IRegionLoader regionLoader; |
48 | if (openSim.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") | 50 | if (openSim.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") |
49 | { | 51 | { |
50 | MainLog.Instance.Notice("LOADREGIONS", "Loading Region Info from filesystem"); | 52 | m_log.Info("[LOADREGIONS]: Loading Region Info from filesystem"); |
51 | regionLoader = new RegionLoaderFileSystem(); | 53 | regionLoader = new RegionLoaderFileSystem(); |
52 | } | 54 | } |
53 | else | 55 | else |
54 | { | 56 | { |
55 | MainLog.Instance.Notice("LOADREGIONSPLUGIN", "Loading Region Info from web"); | 57 | m_log.Info("[LOADREGIONSPLUGIN]: Loading Region Info from web"); |
56 | regionLoader = new RegionLoaderWebServer(); | 58 | regionLoader = new RegionLoaderWebServer(); |
57 | } | 59 | } |
58 | 60 | ||
@@ -63,7 +65,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
63 | 65 | ||
64 | for (int i = 0; i < regionsToLoad.Length; i++) | 66 | for (int i = 0; i < regionsToLoad.Length; i++) |
65 | { | 67 | { |
66 | MainLog.Instance.Debug("LOADREGIONS", "Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")"); | 68 | m_log.Debug("[LOADREGIONS]: Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")"); |
67 | openSim.CreateRegion(regionsToLoad[i]); | 69 | openSim.CreateRegion(regionsToLoad[i]); |
68 | } | 70 | } |
69 | 71 | ||
@@ -73,17 +75,17 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
73 | 75 | ||
74 | public void LoadRegionFromConfig(OpenSimMain openSim, ulong regionhandle) | 76 | public void LoadRegionFromConfig(OpenSimMain openSim, ulong regionhandle) |
75 | { | 77 | { |
76 | MainLog.Instance.Notice("LOADREGIONS", "Load Regions addin being initialised"); | 78 | m_log.Info("[LOADREGIONS]: Load Regions addin being initialised"); |
77 | 79 | ||
78 | IRegionLoader regionLoader; | 80 | IRegionLoader regionLoader; |
79 | if (openSim.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") | 81 | if (openSim.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") |
80 | { | 82 | { |
81 | MainLog.Instance.Notice("LOADREGIONS", "Loading Region Info from filesystem"); | 83 | m_log.Info("[LOADREGIONS]: Loading Region Info from filesystem"); |
82 | regionLoader = new RegionLoaderFileSystem(); | 84 | regionLoader = new RegionLoaderFileSystem(); |
83 | } | 85 | } |
84 | else | 86 | else |
85 | { | 87 | { |
86 | MainLog.Instance.Notice("LOADREGIONS", "Loading Region Info from web"); | 88 | m_log.Info("[LOADREGIONS]: Loading Region Info from web"); |
87 | regionLoader = new RegionLoaderWebServer(); | 89 | regionLoader = new RegionLoaderWebServer(); |
88 | } | 90 | } |
89 | 91 | ||
@@ -93,7 +95,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
93 | { | 95 | { |
94 | if (regionhandle == regionsToLoad[i].RegionHandle) | 96 | if (regionhandle == regionsToLoad[i].RegionHandle) |
95 | { | 97 | { |
96 | MainLog.Instance.Debug("LOADREGIONS", "Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")"); | 98 | m_log.Debug("[LOADREGIONS]: Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")"); |
97 | openSim.CreateRegion(regionsToLoad[i]); | 99 | openSim.CreateRegion(regionsToLoad[i]); |
98 | } | 100 | } |
99 | } | 101 | } |