Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 699ea3f

Browse files
authored
DEV: Add backtrace to logs (#1489)
1 parent 56f025c commit 699ea3f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/jobs/scheduled/categories_locale_detection_backfill.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def execute(args)
2727
rescue FinalDestination::SSRFDetector::LookupFailedError
2828
rescue => e
2929
DiscourseAi::Translation::VerboseLogger.log(
30-
"Failed to detect category #{category.id}'s locale: #{e.message}",
30+
"Failed to detect category #{category.id}'s locale: #{e.message}\n\n#{e.backtrace[0..3].join("\n")}",
3131
)
3232
end
3333
end

app/jobs/scheduled/posts_locale_detection_backfill.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def execute(args)
5151
# do nothing, there are too many sporadic lookup failures
5252
rescue => e
5353
DiscourseAi::Translation::VerboseLogger.log(
54-
"Failed to detect post #{post.id}'s locale: #{e.message}",
54+
"Failed to detect post #{post.id}'s locale: #{e.message}\n\n#{e.backtrace[0..3].join("\n")}",
5555
)
5656
end
5757
end

app/jobs/scheduled/topics_locale_detection_backfill.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def execute(args)
4646
# do nothing, there are too many sporadic lookup failures
4747
rescue => e
4848
DiscourseAi::Translation::VerboseLogger.log(
49-
"Failed to detect topic #{topic.id}'s locale: #{e.message}",
49+
"Failed to detect topic #{topic.id}'s locale: #{e.message}\n\n#{e.backtrace[0..3].join("\n")}",
5050
)
5151
end
5252
end

0 commit comments

Comments
 (0)