[英]Logs are getting truncated and showing this " Truncated. see log file for complete stacktrace" in weblogic console?
我正在使用 WebLogic 控制台查看日志,但我的日志被截斷並顯示此消息
截斷。 查看日志文件以獲取完整的堆棧跟蹤
如何顯示異常堆棧跟蹤的完整日志。 對於日志,我使用 log4j2.xml 文件配置。
請參考下面的截圖,任何人請給我一個解決方案或建議。
public void printStackTrace(int level, Throwable e) {
ByteArrayOutputStream ops = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(ops);
e.printStackTrace(ps);
logger.error(e);
}
默認情況下,堆棧跟蹤深度設置為 5 行,僅適用於標准輸出。 您可以在管理控制台中更新此參數,例如:Servers//logging/Advanced,參數“stdout Stack Trace Depth”
將其設置為 -1 以查看完整的堆棧跟蹤。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.