diff options
author | UbitUmarov | 2015-09-08 15:03:22 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-08 15:03:22 +0100 |
commit | 5b3e2ab9aaf98892f18f733a3c5de816662be42a (patch) | |
tree | 03077685e44648264523e1851cd068d51a507e81 /OpenSim/Region/CoreModules | |
parent | add script events per sec stat, using the time report code, but ignoring the... (diff) | |
parent | More 'everything is a module' merging. (diff) | |
download | opensim-SC_OLD-5b3e2ab9aaf98892f18f733a3c5de816662be42a.zip opensim-SC_OLD-5b3e2ab9aaf98892f18f733a3c5de816662be42a.tar.gz opensim-SC_OLD-5b3e2ab9aaf98892f18f733a3c5de816662be42a.tar.bz2 opensim-SC_OLD-5b3e2ab9aaf98892f18f733a3c5de816662be42a.tar.xz |
Merge branch 'mbworknew1' into ubitworkvarnew
Diffstat (limited to 'OpenSim/Region/CoreModules')
23 files changed, 11 insertions, 207 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index b632774..7d9609f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | |||
@@ -37,7 +37,6 @@ using Nini.Config; | |||
37 | using NUnit.Framework; | 37 | using NUnit.Framework; |
38 | using OpenMetaverse; | 38 | using OpenMetaverse; |
39 | using OpenSim.Framework; | 39 | using OpenSim.Framework; |
40 | using OpenSim.Framework.Communications; | ||
41 | using OpenSim.Framework.Servers; | 40 | using OpenSim.Framework.Servers; |
42 | using OpenSim.Framework.Servers.HttpServer; | 41 | using OpenSim.Framework.Servers.HttpServer; |
43 | using OpenSim.Region.CoreModules.Avatar.Attachments; | 42 | using OpenSim.Region.CoreModules.Avatar.Attachments; |
diff --git a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs index b8a1dba..7bec18f 100644 --- a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs | |||
@@ -38,7 +38,6 @@ using System.Reflection; | |||
38 | using log4net; | 38 | using log4net; |
39 | using OpenSim.Framework; | 39 | using OpenSim.Framework; |
40 | using OpenSim.Framework.ServiceAuth; | 40 | using OpenSim.Framework.ServiceAuth; |
41 | using OpenSim.Framework.Communications; | ||
42 | using OpenSim.Region.Framework.Interfaces; | 41 | using OpenSim.Region.Framework.Interfaces; |
43 | using OpenSim.Region.Framework.Scenes; | 42 | using OpenSim.Region.Framework.Scenes; |
44 | using OpenSim.Services.Interfaces; | 43 | using OpenSim.Services.Interfaces; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 7ab568e..08e7dd2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | |||
@@ -38,7 +38,6 @@ using OpenMetaverse; | |||
38 | using Mono.Addins; | 38 | using Mono.Addins; |
39 | using OpenSim.Framework; | 39 | using OpenSim.Framework; |
40 | using OpenSim.Framework.Servers.HttpServer; | 40 | using OpenSim.Framework.Servers.HttpServer; |
41 | using OpenSim.Framework.Communications; | ||
42 | using OpenSim.Framework.Servers; | 41 | using OpenSim.Framework.Servers; |
43 | using OpenSim.Region.Framework.Interfaces; | 42 | using OpenSim.Region.Framework.Interfaces; |
44 | using OpenSim.Region.Framework.Scenes; | 43 | using OpenSim.Region.Framework.Scenes; |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs index 7ce2813..315d372 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs | |||
@@ -32,7 +32,6 @@ using Nini.Config; | |||
32 | using Mono.Addins; | 32 | using Mono.Addins; |
33 | using OpenMetaverse; | 33 | using OpenMetaverse; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Communications; | ||
36 | using OpenSim.Framework.Servers; | 35 | using OpenSim.Framework.Servers; |
37 | using OpenSim.Framework.Client; | 36 | using OpenSim.Framework.Client; |
38 | using OpenSim.Region.Framework.Interfaces; | 37 | using OpenSim.Region.Framework.Interfaces; |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 1650097..ac89f52 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -32,7 +32,6 @@ using Mono.Addins; | |||
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | using OpenMetaverse; | 33 | using OpenMetaverse; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Communications; | ||
36 | using OpenSim.Framework.Servers; | 35 | using OpenSim.Framework.Servers; |
37 | using OpenSim.Framework.Client; | 36 | using OpenSim.Framework.Client; |
38 | using OpenSim.Region.Framework.Interfaces; | 37 | using OpenSim.Region.Framework.Interfaces; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index 5295ba3..8d11d20 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | |||
@@ -34,7 +34,6 @@ using NDesk.Options; | |||
34 | using Nini.Config; | 34 | using Nini.Config; |
35 | using OpenMetaverse; | 35 | using OpenMetaverse; |
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Communications; | ||
38 | using OpenSim.Framework.Console; | 37 | using OpenSim.Framework.Console; |
39 | using OpenSim.Region.Framework.Interfaces; | 38 | using OpenSim.Region.Framework.Interfaces; |
40 | using OpenSim.Region.Framework.Scenes; | 39 | using OpenSim.Region.Framework.Scenes; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs index 84f9f3f..c2e645f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs | |||
@@ -36,7 +36,6 @@ using OpenSim.Data; | |||
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Serialization; | 37 | using OpenSim.Framework.Serialization; |
38 | using OpenSim.Framework.Serialization.External; | 38 | using OpenSim.Framework.Serialization.External; |
39 | using OpenSim.Framework.Communications; | ||
40 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; | 39 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; |
41 | using OpenSim.Region.CoreModules.World.Serialiser; | 40 | using OpenSim.Region.CoreModules.World.Serialiser; |
42 | using OpenSim.Region.Framework.Scenes; | 41 | using OpenSim.Region.Framework.Scenes; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs index d5f3a22..57b4f80 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs | |||
@@ -36,7 +36,6 @@ using OpenSim.Data; | |||
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Serialization; | 37 | using OpenSim.Framework.Serialization; |
38 | using OpenSim.Framework.Serialization.External; | 38 | using OpenSim.Framework.Serialization.External; |
39 | using OpenSim.Framework.Communications; | ||
40 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; | 39 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; |
41 | using OpenSim.Region.CoreModules.World.Serialiser; | 40 | using OpenSim.Region.CoreModules.World.Serialiser; |
42 | using OpenSim.Region.Framework.Scenes; | 41 | using OpenSim.Region.Framework.Scenes; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs index b614c18..7265405 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs | |||
@@ -36,7 +36,6 @@ using OpenSim.Data; | |||
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Serialization; | 37 | using OpenSim.Framework.Serialization; |
38 | using OpenSim.Framework.Serialization.External; | 38 | using OpenSim.Framework.Serialization.External; |
39 | using OpenSim.Framework.Communications; | ||
40 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; | 39 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; |
41 | using OpenSim.Region.CoreModules.World.Serialiser; | 40 | using OpenSim.Region.CoreModules.World.Serialiser; |
42 | using OpenSim.Region.Framework.Scenes; | 41 | using OpenSim.Region.Framework.Scenes; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs index 4b015d7..519c697 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs | |||
@@ -36,7 +36,6 @@ using OpenSim.Data; | |||
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Serialization; | 37 | using OpenSim.Framework.Serialization; |
38 | using OpenSim.Framework.Serialization.External; | 38 | using OpenSim.Framework.Serialization.External; |
39 | using OpenSim.Framework.Communications; | ||
40 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; | 39 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; |
41 | using OpenSim.Region.CoreModules.World.Serialiser; | 40 | using OpenSim.Region.CoreModules.World.Serialiser; |
42 | using OpenSim.Region.Framework.Scenes; | 41 | using OpenSim.Region.Framework.Scenes; |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 9a57599..3cbde62 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -36,7 +36,7 @@ using OpenSim.Framework.Client; | |||
36 | using OpenSim.Framework.Monitoring; | 36 | using OpenSim.Framework.Monitoring; |
37 | using OpenSim.Region.Framework.Interfaces; | 37 | using OpenSim.Region.Framework.Interfaces; |
38 | using OpenSim.Region.Framework.Scenes; | 38 | using OpenSim.Region.Framework.Scenes; |
39 | using OpenSim.Region.Physics.Manager; | 39 | using OpenSim.Region.PhysicsModules.SharedBase; |
40 | using OpenSim.Services.Interfaces; | 40 | using OpenSim.Services.Interfaces; |
41 | 41 | ||
42 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 42 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs index 54ec751..e3c6c0d 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs | |||
@@ -38,7 +38,7 @@ using OpenSim.Framework.Capabilities; | |||
38 | using OpenSim.Framework.Client; | 38 | using OpenSim.Framework.Client; |
39 | using OpenSim.Region.Framework.Interfaces; | 39 | using OpenSim.Region.Framework.Interfaces; |
40 | using OpenSim.Region.Framework.Scenes; | 40 | using OpenSim.Region.Framework.Scenes; |
41 | using OpenSim.Region.Physics.Manager; | 41 | using OpenSim.Region.PhysicsModules.SharedBase; |
42 | using OpenSim.Services.Interfaces; | 42 | using OpenSim.Services.Interfaces; |
43 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 43 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
44 | 44 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs index c64ab44..1d91165 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs | |||
@@ -37,7 +37,6 @@ using OpenSim.Data; | |||
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Serialization; | 38 | using OpenSim.Framework.Serialization; |
39 | using OpenSim.Framework.Serialization.External; | 39 | using OpenSim.Framework.Serialization.External; |
40 | using OpenSim.Framework.Communications; | ||
41 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; | 40 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; |
42 | using OpenSim.Region.CoreModules.Framework.InventoryAccess; | 41 | using OpenSim.Region.CoreModules.Framework.InventoryAccess; |
43 | using OpenSim.Region.Framework.Scenes; | 42 | using OpenSim.Region.Framework.Scenes; |
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs index d10c9b4..862f0b7 100644 --- a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs | |||
@@ -30,7 +30,6 @@ using System.IO; | |||
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | 31 | ||
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using OpenSim.Framework.Communications; | ||
34 | 33 | ||
35 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; | 34 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; |
36 | using OpenSim.Region.Framework; | 35 | using OpenSim.Region.Framework; |
@@ -159,7 +158,7 @@ namespace OpenSim.Region.CoreModules.Framework.Library | |||
159 | } | 158 | } |
160 | 159 | ||
161 | RegionInfo regInfo = new RegionInfo(); | 160 | RegionInfo regInfo = new RegionInfo(); |
162 | Scene m_MockScene = new Scene(regInfo, null); | 161 | Scene m_MockScene = new Scene(regInfo); |
163 | LocalInventoryService invService = new LocalInventoryService(lib); | 162 | LocalInventoryService invService = new LocalInventoryService(lib); |
164 | m_MockScene.RegisterModuleInterface<IInventoryService>(invService); | 163 | m_MockScene.RegisterModuleInterface<IInventoryService>(invService); |
165 | m_MockScene.RegisterModuleInterface<IAssetService>(m_Scene.AssetService); | 164 | m_MockScene.RegisterModuleInterface<IAssetService>(m_Scene.AssetService); |
diff --git a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/LogWriter.cs b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/LogWriter.cs deleted file mode 100755 index a176958..0000000 --- a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/LogWriter.cs +++ /dev/null | |||
@@ -1,181 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.IO; | ||
30 | using System.Text; | ||
31 | using log4net; | ||
32 | |||
33 | namespace OpenSim.Region.CoreModules.Framework.Statistics.Logging | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// Class for writing a high performance, high volume log file. | ||
37 | /// Sometimes, to debug, one has a high volume logging to do and the regular | ||
38 | /// log file output is not appropriate. | ||
39 | /// Create a new instance with the parameters needed and | ||
40 | /// call Write() to output a line. Call Close() when finished. | ||
41 | /// If created with no parameters, it will not log anything. | ||
42 | /// </summary> | ||
43 | public class LogWriter : IDisposable | ||
44 | { | ||
45 | public bool Enabled { get; private set; } | ||
46 | |||
47 | private string m_logDirectory = "."; | ||
48 | private int m_logMaxFileTimeMin = 5; // 5 minutes | ||
49 | public String LogFileHeader { get; set; } | ||
50 | |||
51 | private StreamWriter m_logFile = null; | ||
52 | private TimeSpan m_logFileLife; | ||
53 | private DateTime m_logFileEndTime; | ||
54 | private Object m_logFileWriteLock = new Object(); | ||
55 | private bool m_flushWrite; | ||
56 | |||
57 | // set externally when debugging. If let 'null', this does not write any error messages. | ||
58 | public ILog ErrorLogger = null; | ||
59 | private string LogHeader = "[LOG WRITER]"; | ||
60 | |||
61 | /// <summary> | ||
62 | /// Create a log writer that will not write anything. Good for when not enabled | ||
63 | /// but the write statements are still in the code. | ||
64 | /// </summary> | ||
65 | public LogWriter() | ||
66 | { | ||
67 | Enabled = false; | ||
68 | m_logFile = null; | ||
69 | } | ||
70 | |||
71 | /// <summary> | ||
72 | /// Create a log writer instance. | ||
73 | /// </summary> | ||
74 | /// <param name="dir">The directory to create the log file in. May be 'null' for default.</param> | ||
75 | /// <param name="headr">The characters that begin the log file name. May be 'null' for default.</param> | ||
76 | /// <param name="maxFileTime">Maximum age of a log file in minutes. If zero, will set default.</param> | ||
77 | /// <param name="flushWrite">Whether to do a flush after every log write. Best left off but | ||
78 | /// if one is looking for a crash, this is a good thing to turn on.</param> | ||
79 | public LogWriter(string dir, string headr, int maxFileTime, bool flushWrite) | ||
80 | { | ||
81 | m_logDirectory = dir == null ? "." : dir; | ||
82 | |||
83 | LogFileHeader = headr == null ? "log-" : headr; | ||
84 | |||
85 | m_logMaxFileTimeMin = maxFileTime; | ||
86 | if (m_logMaxFileTimeMin < 1) | ||
87 | m_logMaxFileTimeMin = 5; | ||
88 | |||
89 | m_logFileLife = new TimeSpan(0, m_logMaxFileTimeMin, 0); | ||
90 | m_logFileEndTime = DateTime.Now + m_logFileLife; | ||
91 | |||
92 | m_flushWrite = flushWrite; | ||
93 | |||
94 | Enabled = true; | ||
95 | } | ||
96 | // Constructor that assumes flushWrite is off. | ||
97 | public LogWriter(string dir, string headr, int maxFileTime) : this(dir, headr, maxFileTime, false) | ||
98 | { | ||
99 | } | ||
100 | |||
101 | public void Dispose() | ||
102 | { | ||
103 | this.Close(); | ||
104 | } | ||
105 | |||
106 | public void Close() | ||
107 | { | ||
108 | Enabled = false; | ||
109 | if (m_logFile != null) | ||
110 | { | ||
111 | m_logFile.Close(); | ||
112 | m_logFile.Dispose(); | ||
113 | m_logFile = null; | ||
114 | } | ||
115 | } | ||
116 | |||
117 | public void Write(string line, params object[] args) | ||
118 | { | ||
119 | if (!Enabled) return; | ||
120 | Write(String.Format(line, args)); | ||
121 | } | ||
122 | |||
123 | public void Flush() | ||
124 | { | ||
125 | if (!Enabled) return; | ||
126 | if (m_logFile != null) | ||
127 | { | ||
128 | m_logFile.Flush(); | ||
129 | } | ||
130 | } | ||
131 | |||
132 | public void Write(string line) | ||
133 | { | ||
134 | if (!Enabled) return; | ||
135 | try | ||
136 | { | ||
137 | lock (m_logFileWriteLock) | ||
138 | { | ||
139 | DateTime now = DateTime.UtcNow; | ||
140 | if (m_logFile == null || now > m_logFileEndTime) | ||
141 | { | ||
142 | if (m_logFile != null) | ||
143 | { | ||
144 | m_logFile.Close(); | ||
145 | m_logFile.Dispose(); | ||
146 | m_logFile = null; | ||
147 | } | ||
148 | |||
149 | // First log file or time has expired, start writing to a new log file | ||
150 | m_logFileEndTime = now + m_logFileLife; | ||
151 | string path = (m_logDirectory.Length > 0 ? m_logDirectory | ||
152 | + System.IO.Path.DirectorySeparatorChar.ToString() : "") | ||
153 | + String.Format("{0}{1}.log", LogFileHeader, now.ToString("yyyyMMddHHmmss")); | ||
154 | m_logFile = new StreamWriter(File.Open(path, FileMode.Append, FileAccess.Write, FileShare.ReadWrite)); | ||
155 | } | ||
156 | if (m_logFile != null) | ||
157 | { | ||
158 | StringBuilder buff = new StringBuilder(line.Length + 25); | ||
159 | buff.Append(now.ToString("yyyyMMddHHmmssfff")); | ||
160 | // buff.Append(now.ToString("yyyyMMddHHmmss")); | ||
161 | buff.Append(","); | ||
162 | buff.Append(line); | ||
163 | buff.Append("\r\n"); | ||
164 | m_logFile.Write(buff.ToString()); | ||
165 | if (m_flushWrite) | ||
166 | m_logFile.Flush(); | ||
167 | } | ||
168 | } | ||
169 | } | ||
170 | catch (Exception e) | ||
171 | { | ||
172 | if (ErrorLogger != null) | ||
173 | { | ||
174 | ErrorLogger.ErrorFormat("{0}: FAILURE WRITING TO LOGFILE: {1}", LogHeader, e); | ||
175 | } | ||
176 | Enabled = false; | ||
177 | } | ||
178 | return; | ||
179 | } | ||
180 | } | ||
181 | } | ||
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index c0faad8..87f4798 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | |||
@@ -37,7 +37,6 @@ using System.Security.Cryptography.X509Certificates; | |||
37 | using Nini.Config; | 37 | using Nini.Config; |
38 | using OpenMetaverse; | 38 | using OpenMetaverse; |
39 | using OpenSim.Framework; | 39 | using OpenSim.Framework; |
40 | using OpenSim.Framework.Communications; | ||
41 | using OpenSim.Framework.Servers; | 40 | using OpenSim.Framework.Servers; |
42 | using OpenSim.Framework.Servers.HttpServer; | 41 | using OpenSim.Framework.Servers.HttpServer; |
43 | using OpenSim.Region.Framework.Interfaces; | 42 | using OpenSim.Region.Framework.Interfaces; |
diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs index 7462ebd..d45962f 100644 --- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs | |||
@@ -32,7 +32,7 @@ using System.Net; | |||
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | using OpenMetaverse; | 33 | using OpenMetaverse; |
34 | using OpenMetaverse.Imaging; | 34 | using OpenMetaverse.Imaging; |
35 | using OpenSim.Framework.Communications; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Region.CoreModules.Scripting.DynamicTexture; | 36 | using OpenSim.Region.CoreModules.Scripting.DynamicTexture; |
37 | using OpenSim.Region.Framework.Interfaces; | 37 | using OpenSim.Region.Framework.Interfaces; |
38 | using OpenSim.Region.Framework.Scenes; | 38 | using OpenSim.Region.Framework.Scenes; |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs index 8df30d4..c33f7f5 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs | |||
@@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests | |||
85 | r1.ExternalHostName = "127.0.0.1"; | 85 | r1.ExternalHostName = "127.0.0.1"; |
86 | r1.HttpPort = 9001; | 86 | r1.HttpPort = 9001; |
87 | r1.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); | 87 | r1.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); |
88 | Scene s = new Scene(new RegionInfo(), null); | 88 | Scene s = new Scene(new RegionInfo()); |
89 | s.RegionInfo.RegionID = r1.RegionID; | 89 | s.RegionInfo.RegionID = r1.RegionID; |
90 | m_LocalConnector.AddRegion(s); | 90 | m_LocalConnector.AddRegion(s); |
91 | 91 | ||
@@ -97,7 +97,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests | |||
97 | r2.ExternalHostName = "127.0.0.1"; | 97 | r2.ExternalHostName = "127.0.0.1"; |
98 | r2.HttpPort = 9002; | 98 | r2.HttpPort = 9002; |
99 | r2.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); | 99 | r2.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); |
100 | s = new Scene(new RegionInfo(), null); | 100 | s = new Scene(new RegionInfo()); |
101 | s.RegionInfo.RegionID = r2.RegionID; | 101 | s.RegionInfo.RegionID = r2.RegionID; |
102 | m_LocalConnector.AddRegion(s); | 102 | m_LocalConnector.AddRegion(s); |
103 | 103 | ||
@@ -109,7 +109,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests | |||
109 | r3.ExternalHostName = "127.0.0.1"; | 109 | r3.ExternalHostName = "127.0.0.1"; |
110 | r3.HttpPort = 9003; | 110 | r3.HttpPort = 9003; |
111 | r3.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); | 111 | r3.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); |
112 | s = new Scene(new RegionInfo(), null); | 112 | s = new Scene(new RegionInfo()); |
113 | s.RegionInfo.RegionID = r3.RegionID; | 113 | s.RegionInfo.RegionID = r3.RegionID; |
114 | m_LocalConnector.AddRegion(s); | 114 | m_LocalConnector.AddRegion(s); |
115 | 115 | ||
@@ -121,7 +121,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests | |||
121 | r4.ExternalHostName = "127.0.0.1"; | 121 | r4.ExternalHostName = "127.0.0.1"; |
122 | r4.HttpPort = 9004; | 122 | r4.HttpPort = 9004; |
123 | r4.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); | 123 | r4.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); |
124 | s = new Scene(new RegionInfo(), null); | 124 | s = new Scene(new RegionInfo()); |
125 | s.RegionInfo.RegionID = r4.RegionID; | 125 | s.RegionInfo.RegionID = r4.RegionID; |
126 | m_LocalConnector.AddRegion(s); | 126 | m_LocalConnector.AddRegion(s); |
127 | 127 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index 12ffc01..c1daae9 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | |||
@@ -38,7 +38,6 @@ using Nini.Config; | |||
38 | using OpenMetaverse; | 38 | using OpenMetaverse; |
39 | using OpenMetaverse.StructuredData; | 39 | using OpenMetaverse.StructuredData; |
40 | using OpenSim.Framework; | 40 | using OpenSim.Framework; |
41 | using OpenSim.Framework.Communications; | ||
42 | using OpenSim.Region.Framework.Interfaces; | 41 | using OpenSim.Region.Framework.Interfaces; |
43 | using OpenSim.Region.Framework.Scenes; | 42 | using OpenSim.Region.Framework.Scenes; |
44 | using OpenSim.Region.Framework.Scenes.Serialization; | 43 | using OpenSim.Region.Framework.Scenes.Serialization; |
diff --git a/OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs b/OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs index f54ab2c..4bb3799 100644 --- a/OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs | |||
@@ -34,7 +34,6 @@ using Nini.Config; | |||
34 | using Nwc.XmlRpc; | 34 | using Nwc.XmlRpc; |
35 | using OpenMetaverse; | 35 | using OpenMetaverse; |
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Communications; | ||
38 | using OpenSim.Region.Framework.Interfaces; | 37 | using OpenSim.Region.Framework.Interfaces; |
39 | using OpenSim.Region.Framework.Scenes; | 38 | using OpenSim.Region.Framework.Scenes; |
40 | using OpenSim.Services.Interfaces; | 39 | using OpenSim.Services.Interfaces; |
diff --git a/OpenSim/Region/CoreModules/World/Land/DwellModule.cs b/OpenSim/Region/CoreModules/World/Land/DwellModule.cs index d17c517..70c6028 100644 --- a/OpenSim/Region/CoreModules/World/Land/DwellModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/DwellModule.cs | |||
@@ -45,7 +45,7 @@ using OpenSim.Framework.Servers.HttpServer; | |||
45 | using OpenSim.Region.CoreModules.Framework.InterfaceCommander; | 45 | using OpenSim.Region.CoreModules.Framework.InterfaceCommander; |
46 | using OpenSim.Region.Framework.Interfaces; | 46 | using OpenSim.Region.Framework.Interfaces; |
47 | using OpenSim.Region.Framework.Scenes; | 47 | using OpenSim.Region.Framework.Scenes; |
48 | using OpenSim.Region.Physics.Manager; | 48 | using OpenSim.Region.PhysicsModules.SharedBase; |
49 | using OpenSim.Services.Interfaces; | 49 | using OpenSim.Services.Interfaces; |
50 | using Caps = OpenSim.Framework.Capabilities.Caps; | 50 | using Caps = OpenSim.Framework.Capabilities.Caps; |
51 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 51 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 749c2cc..ad6793f 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -44,7 +44,7 @@ using OpenSim.Framework.Servers; | |||
44 | using OpenSim.Framework.Servers.HttpServer; | 44 | using OpenSim.Framework.Servers.HttpServer; |
45 | using OpenSim.Region.Framework.Interfaces; | 45 | using OpenSim.Region.Framework.Interfaces; |
46 | using OpenSim.Region.Framework.Scenes; | 46 | using OpenSim.Region.Framework.Scenes; |
47 | using OpenSim.Region.Physics.Manager; | 47 | using OpenSim.Region.PhysicsModules.SharedBase; |
48 | using OpenSim.Services.Interfaces; | 48 | using OpenSim.Services.Interfaces; |
49 | using Caps = OpenSim.Framework.Capabilities.Caps; | 49 | using Caps = OpenSim.Framework.Capabilities.Caps; |
50 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 50 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index 8e843ee..443eee1 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | |||
@@ -41,7 +41,7 @@ using Mono.Addins; | |||
41 | using OpenSim.Framework; | 41 | using OpenSim.Framework; |
42 | using OpenSim.Region.Framework.Interfaces; | 42 | using OpenSim.Region.Framework.Interfaces; |
43 | using OpenSim.Region.Framework.Scenes; | 43 | using OpenSim.Region.Framework.Scenes; |
44 | using OpenSim.Region.Physics.Manager; | 44 | using OpenSim.Region.PhysicsModules.SharedBase; |
45 | using OpenSim.Services.Interfaces; | 45 | using OpenSim.Services.Interfaces; |
46 | 46 | ||
47 | using OpenMetaverse; | 47 | using OpenMetaverse; |