chore(lint): wrap gateway exit log line

This commit is contained in:
Yum-King 2026-04-20 20:44:41 +08:00
parent 735187c86c
commit 1c953db972

View file

@ -764,7 +764,14 @@ func (h *Handler) startGatewayLocked(initialStatus string, existingPid int) (int
if err := cmd.Wait(); err != nil { if err := cmd.Wait(); err != nil {
tail := gateway.logs.Tail(50) tail := gateway.logs.Tail(50)
if len(tail) > 0 { if len(tail) > 0 {
logger.ErrorC("gateway", fmt.Sprintf("Gateway process exited: %v\nLast gateway logs:\n%s", err, strings.Join(tail, "\n"))) logger.ErrorC(
"gateway",
fmt.Sprintf(
"Gateway process exited: %v\nLast gateway logs:\n%s",
err,
strings.Join(tail, "\n"),
),
)
} else { } else {
logger.ErrorC("gateway", fmt.Sprintf("Gateway process exited: %v", err)) logger.ErrorC("gateway", fmt.Sprintf("Gateway process exited: %v", err))
} }