chore: update log format

This commit is contained in:
JustSong 2024-05-28 01:29:57 +08:00
parent d6769c0175
commit 391759dc16

View File

@ -118,7 +118,7 @@ func shouldRetry(c *gin.Context, statusCode int) bool {
}
func processChannelRelayError(ctx context.Context, userId int, channelId int, channelName string, err *model.ErrorWithStatusCode) {
logger.Errorf(ctx, "relay error (userId #%d channel #%d): %s", userId, channelId, err.Message)
logger.Errorf(ctx, "relay error (channel id %d, user id: %d): %s", channelId, userId, err.Message)
// https://platform.openai.com/docs/guides/error-codes/api-errors
if monitor.ShouldDisableChannel(&err.Error, err.StatusCode) {
monitor.DisableChannel(channelId, channelName, err.Message)