mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
* Fixed an config issue (log not initialized in RegionInfo config)
* Added LineInfo stacktrace parser to LogBase (not used yet though)
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenSim.Framework.Console
|
||||
{
|
||||
@@ -417,5 +418,39 @@ namespace OpenSim.Framework.Console
|
||||
string[] cmdparams = (string[])tempstrarray;
|
||||
RunCmd(cmd, cmdparams);
|
||||
}
|
||||
|
||||
public string LineInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
string result = String.Empty;
|
||||
|
||||
string stacktrace = Environment.StackTrace;
|
||||
List<string> lines = new List<string>(stacktrace.Split(new string[] { "at " }, StringSplitOptions.None));
|
||||
|
||||
if (lines.Count > 4)
|
||||
{
|
||||
lines.RemoveRange(0, 4);
|
||||
|
||||
string tmpLine = lines[0];
|
||||
|
||||
int inIndex = tmpLine.IndexOf(" in ");
|
||||
|
||||
if (inIndex > -1)
|
||||
{
|
||||
result = tmpLine.Substring(0, inIndex);
|
||||
|
||||
int lineIndex = tmpLine.IndexOf(":line ");
|
||||
|
||||
if (lineIndex > -1)
|
||||
{
|
||||
lineIndex += 6;
|
||||
result += ", line " + tmpLine.Substring(lineIndex, (tmpLine.Length - lineIndex) - 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,11 @@ namespace OpenSim.Framework.Types
|
||||
configMember.performConfigurationRetrieve();
|
||||
}
|
||||
|
||||
public NetworkServersInfo( )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void loadConfigurationOptions()
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user