log for not prod env

This commit is contained in:
Timi
2025-11-07 15:15:41 +08:00
parent 6a57d22366
commit 3eb6bd7df5

View File

@ -89,7 +89,7 @@ public class GlobalExceptionHandler {
@ExceptionHandler(Throwable.class)
public TimiResponse<?> error(Throwable e) {
if (e instanceof TimiException timiE) {
if (env.startsWith("dev") || log.isDebugEnabled()) {
if (!env.startsWith("prod") || log.isDebugEnabled()) {
log.error(timiE.getMessage(), e);
}
// 一般异常