소스 검색

log thread stack and exception upon oome

tags/2.0.1
Jonathan Cobb 4 년 전
부모
커밋
791ccaf045
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. +2
    -1
      src/main/java/org/cobbzilla/util/system/OutOfMemoryErrorUncaughtExceptionHandler.java

+ 2
- 1
src/main/java/org/cobbzilla/util/system/OutOfMemoryErrorUncaughtExceptionHandler.java 파일 보기

@@ -4,6 +4,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import static org.cobbzilla.util.daemon.ZillaRuntime.shortError;
import static org.cobbzilla.util.daemon.ZillaRuntime.stacktrace;

@AllArgsConstructor @Slf4j
public class OutOfMemoryErrorUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler {
@@ -17,7 +18,7 @@ public class OutOfMemoryErrorUncaughtExceptionHandler implements Thread.Uncaught
@Override public void uncaughtException(Thread t, Throwable e) {
if (e instanceof OutOfMemoryError) {
try {
log.error("!!!!! OutOfMemoryError: calling System.exit("+status+")", e);
log.error("!!!!! OutOfMemoryError: calling System.exit("+status+") from "+stacktrace(t), e);
} catch (Throwable ignored) {}
System.exit(status);
} else {


불러오는 중...
취소
저장