diff options
-rw-r--r-- | OpenSim/Framework/Util.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index ed92b2d..4b0b13c 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -1664,13 +1664,14 @@ namespace OpenSim.Framework | |||
1664 | /// </summary> | 1664 | /// </summary> |
1665 | public static void PrintCallStack() | 1665 | public static void PrintCallStack() |
1666 | { | 1666 | { |
1667 | StackTrace stackTrace = new StackTrace(); // get call stack | 1667 | StackTrace stackTrace = new StackTrace(true); // get call stack |
1668 | StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames) | 1668 | StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames) |
1669 | 1669 | ||
1670 | // write call stack method names | 1670 | // write call stack method names |
1671 | foreach (StackFrame stackFrame in stackFrames) | 1671 | foreach (StackFrame stackFrame in stackFrames) |
1672 | { | 1672 | { |
1673 | m_log.Debug(stackFrame.GetMethod().DeclaringType + "." + stackFrame.GetMethod().Name); // write method name | 1673 | MethodBase mb = stackFrame.GetMethod(); |
1674 | m_log.DebugFormat("{0}.{1}:{2}", mb.DeclaringType, mb.Name, stackFrame.GetFileLineNumber()); // write method name | ||
1674 | } | 1675 | } |
1675 | } | 1676 | } |
1676 | 1677 | ||