aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 7d88604..d206fc1 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1867,6 +1867,12 @@ namespace OpenSim.Framework
1867 /// </summary> 1867 /// </summary>
1868 public static void PrintCallStack() 1868 public static void PrintCallStack()
1869 { 1869 {
1870 PrintCallStack(m_log.DebugFormat);
1871 }
1872
1873 public delegate void DebugPrinter(string msg, params Object[] parm);
1874 public static void PrintCallStack(DebugPrinter printer)
1875 {
1870 StackTrace stackTrace = new StackTrace(true); // get call stack 1876 StackTrace stackTrace = new StackTrace(true); // get call stack
1871 StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames) 1877 StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames)
1872 1878
@@ -1874,7 +1880,7 @@ namespace OpenSim.Framework
1874 foreach (StackFrame stackFrame in stackFrames) 1880 foreach (StackFrame stackFrame in stackFrames)
1875 { 1881 {
1876 MethodBase mb = stackFrame.GetMethod(); 1882 MethodBase mb = stackFrame.GetMethod();
1877 m_log.DebugFormat("{0}.{1}:{2}", mb.DeclaringType, mb.Name, stackFrame.GetFileLineNumber()); // write method name 1883 printer("{0}.{1}:{2}", mb.DeclaringType, mb.Name, stackFrame.GetFileLineNumber()); // write method name
1878 } 1884 }
1879 } 1885 }
1880 1886