Showing
1 changed file
with
11 additions
and
11 deletions
| @@ -464,12 +464,12 @@ class ReportAgent: | @@ -464,12 +464,12 @@ class ReportAgent: | ||
| 464 | ) | 464 | ) |
| 465 | readable_label = "内容密度异常" if error_kind == "content_sparse" else "JSON解析失败" | 465 | readable_label = "内容密度异常" if error_kind == "content_sparse" else "JSON解析失败" |
| 466 | logger.warning( | 466 | logger.warning( |
| 467 | - "章节 %s %s(第 %s/%s 次尝试): %s", | ||
| 468 | - section.title, | ||
| 469 | - readable_label, | ||
| 470 | - attempt, | ||
| 471 | - chapter_max_attempts, | ||
| 472 | - structured_error, | 467 | + "章节 {title} {label}(第 {attempt}/{total} 次尝试): {error}", |
| 468 | + title=section.title, | ||
| 469 | + label=readable_label, | ||
| 470 | + attempt=attempt, | ||
| 471 | + total=chapter_max_attempts, | ||
| 472 | + error=structured_error, | ||
| 473 | ) | 473 | ) |
| 474 | emit('chapter_status', { | 474 | emit('chapter_status', { |
| 475 | 'chapterId': section.chapter_id, | 475 | 'chapterId': section.chapter_id, |
| @@ -487,11 +487,11 @@ class ReportAgent: | @@ -487,11 +487,11 @@ class ReportAgent: | ||
| 487 | if not self._should_retry_inappropriate_content_error(chapter_error): | 487 | if not self._should_retry_inappropriate_content_error(chapter_error): |
| 488 | raise | 488 | raise |
| 489 | logger.warning( | 489 | logger.warning( |
| 490 | - "章节 %s 触发内容安全限制(第 %s/%s 次尝试),准备重新生成: %s", | ||
| 491 | - section.title, | ||
| 492 | - attempt, | ||
| 493 | - chapter_max_attempts, | ||
| 494 | - chapter_error, | 490 | + "章节 {title} 触发内容安全限制(第 {attempt}/{total} 次尝试),准备重新生成: {error}", |
| 491 | + title=section.title, | ||
| 492 | + attempt=attempt, | ||
| 493 | + total=chapter_max_attempts, | ||
| 494 | + error=chapter_error, | ||
| 495 | ) | 495 | ) |
| 496 | emit('chapter_status', { | 496 | emit('chapter_status', { |
| 497 | 'chapterId': section.chapter_id, | 497 | 'chapterId': section.chapter_id, |
-
Please register or login to post a comment