Update logging to use info for key logs, also use [PodcastEpisode] prefix to match other logs

This commit is contained in:
Harry Rose 2026-03-13 20:11:03 +00:00
parent b3ba764d11
commit 32ea3e08d6

View file

@ -87,7 +87,7 @@ class PodcastEpisode extends Model {
} else if (rssPodcastEpisode.chapters?.length) {
podcastEpisode.chapters = rssPodcastEpisode.chapters.map((ch) => ({ ...ch }))
} else {
Logger.debug("Podcast episode doesn't have chapters, attempting to generate them from timestamps", rssPodcastEpisode.title)
Logger.info("[PodcastEpisode] New episode doesn't have chapters, attempting to generate them from timestamps", rssPodcastEpisode.title)
try {
let autoGeneratedChapters = PodcastEpisode.autoGenerateChaptersFromTimestamps(podcastEpisode.description, podcastEpisode.audioFile.duration)
podcastEpisode.chapters = autoGeneratedChapters
@ -313,7 +313,7 @@ class PodcastEpisode extends Model {
newChapters[newChapters.length - 1].end = audioDurationSecs
}
Logger.debug(`Successfully gnerated ${newChapters.length} chapters`)
Logger.info(`[PodcastEpisode] Successfully gnerated ${newChapters.length} chapters`)
if (newChapters.length == 1) {
throw new Error('Only one chapter found, treating as invalid description')