aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/Util.cs6
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs6
-rw-r--r--bin/OpenSimDefaults.ini8
3 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index c8a0c68..740e55a 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -127,12 +127,14 @@ namespace OpenSim.Framework
127 /// 3 = full stack trace, including common threads 127 /// 3 = full stack trace, including common threads
128 /// </summary> 128 /// </summary>
129 public static int LogThreadPool { get; set; } 129 public static int LogThreadPool { get; set; }
130 public static bool LogOverloads { get; set; }
130 131
131 public static readonly int MAX_THREADPOOL_LEVEL = 3; 132 public static readonly int MAX_THREADPOOL_LEVEL = 3;
132 133
133 static Util() 134 static Util()
134 { 135 {
135 LogThreadPool = 0; 136 LogThreadPool = 0;
137 LogOverloads = true;
136 } 138 }
137 139
138 private static uint nextXferID = 5000; 140 private static uint nextXferID = 5000;
@@ -2172,7 +2174,7 @@ namespace OpenSim.Framework
2172 { 2174 {
2173 long numRunning = numRunningThreadFuncs; 2175 long numRunning = numRunningThreadFuncs;
2174 2176
2175 if (m_ThreadPool != null) 2177 if (m_ThreadPool != null && LogOverloads)
2176 { 2178 {
2177 if ((threadFuncOverloadMode == 0) && (numRunning >= m_ThreadPool.MaxThreads)) 2179 if ((threadFuncOverloadMode == 0) && (numRunning >= m_ThreadPool.MaxThreads))
2178 { 2180 {
@@ -2193,7 +2195,7 @@ namespace OpenSim.Framework
2193 threadInfo.StackTrace = full; 2195 threadInfo.StackTrace = full;
2194 threadInfo.LogThread = ShouldLogThread(partial); 2196 threadInfo.LogThread = ShouldLogThread(partial);
2195 2197
2196 if (loggingEnabled && threadInfo.LogThread) 2198 if (threadInfo.LogThread)
2197 { 2199 {
2198 m_log.DebugFormat("Queue threadfunc {0} (Queued {1}, Running {2}) {3}{4}", 2200 m_log.DebugFormat("Queue threadfunc {0} (Queued {1}, Running {2}) {3}{4}",
2199 threadFuncNum, numQueued, numRunningThreadFuncs, 2201 threadFuncNum, numQueued, numRunningThreadFuncs,
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 9d36986..feb3cf8 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -154,6 +154,12 @@ namespace OpenSim
154 proxyUrl = networkConfig.GetString("proxy_url", ""); 154 proxyUrl = networkConfig.GetString("proxy_url", "");
155 proxyOffset = Int32.Parse(networkConfig.GetString("proxy_offset", "0")); 155 proxyOffset = Int32.Parse(networkConfig.GetString("proxy_offset", "0"));
156 } 156 }
157
158 IConfig startupConfig = Config.Configs["Startup"];
159 if (startupConfig != null)
160 {
161 Util.LogOverloads = startupConfig.GetBoolean("LogOverloads", true);
162 }
157 } 163 }
158 164
159 protected virtual void LoadPlugins() 165 protected virtual void LoadPlugins()
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 2a92fbc..df332ca 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -292,6 +292,14 @@
292 ; False items will be removed from the scene permanently 292 ; False items will be removed from the scene permanently
293 UseTrashOnDelete = True 293 UseTrashOnDelete = True
294 294
295 ; #
296 ; # Logging
297 ; #
298
299 ; Force logging when the thread pool approaches an overload condition
300 ; Provides useful data for post-mortem analysis even in a production
301 ; system with reduced logging
302 LogOverloads = True
295 303
296[Map] 304[Map]
297 ;WorldMapModule = "WorldMap" 305 ;WorldMapModule = "WorldMap"