MCPcopy Create free account
hub / github.com/Teneted/Tenet / dumpThread

Method dumpThread

src/main/java/org/spigotmc/WatchdogThread.java:110–133  ·  view source on GitHub ↗
(ThreadInfo thread, Logger log)

Source from the content-addressed store, hash-verified

108 }
109
110 private static void dumpThread(ThreadInfo thread, Logger log)
111 {
112 log.log( Level.SEVERE, "------------------------------" );
113 //
114 log.log( Level.SEVERE, "Current Thread: " + thread.getThreadName() );
115 log.log( Level.SEVERE, "\tPID: " + thread.getThreadId()
116 + " | Suspended: " + thread.isSuspended()
117 + " | Native: " + thread.isInNative()
118 + " | State: " + thread.getThreadState() );
119 if ( thread.getLockedMonitors().length != 0 )
120 {
121 log.log( Level.SEVERE, "\tThread is waiting on monitor(s):" );
122 for ( MonitorInfo monitor : thread.getLockedMonitors() )
123 {
124 log.log( Level.SEVERE, "\t\tLocked on:" + monitor.getLockedStackFrame() );
125 }
126 }
127 log.log( Level.SEVERE, "\tStack:" );
128 //
129 for ( StackTraceElement stack : thread.getStackTrace() )
130 {
131 log.log( Level.SEVERE, "\t\t" + stack );
132 }
133 }
134}

Callers 1

runMethod · 0.95

Calls 1

logMethod · 0.45

Tested by

no test coverage detected