"backtrace": "%replace(%ex{full}){"[\r\n]+", "###"}"%nopex
ex{full} :{}中指定需要打印的異常行數,full為全部異常信息
%nopex:處理多余的堆棧輸出信息,不加這個的話,堆棧信息重復輸出一遍,且存在換行
{"[\r\n]+", "###"} 替換異常信息中的換行符為###
文檔:http://logback.qos.ch/manual/layouts.html
參考:https://www.it1352.com/1575632.html