Skip to content

Commit 6d0c22f

Browse files
committed
fix 请求日志空指针问题
1 parent e144b12 commit 6d0c22f

File tree

1 file changed

+5
-1
lines changed
  • server/internal/logic/sys

1 file changed

+5
-1
lines changed

server/internal/logic/sys/log.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ func (s *sSysLog) AutoLog(ctx context.Context) error {
111111
}()
112112

113113
config, err := service.SysConfig().GetLoadLog(ctx)
114-
if err != nil || !config.Switch {
114+
if err != nil {
115+
return
116+
}
117+
118+
if config == nil || !config.Switch {
115119
return
116120
}
117121

0 commit comments

Comments
 (0)