update logging

This commit is contained in:
2025-07-04 08:46:41 +02:00
parent b0465a020d
commit 77e483d637
8 changed files with 96 additions and 87 deletions

View File

@ -1,10 +1,12 @@
import { BASE_URL, WEBSUB_HUB } from '$env/static/private';
import { PUBLIC_MASTODON_INSTANCE_DISPLAY_NAME } from '$env/static/public';
import type { Post } from '$lib//mastodon/response';
import { log } from '$lib/log';
import { Logger } from '$lib/log';
import { Feed } from 'feed';
import fs from 'fs/promises';
const logger = new Logger('RSS');
export function createFeed(posts: Post[]): Feed {
const baseUrl = BASE_URL.endsWith('/') ? BASE_URL : BASE_URL + '/';
const hub = WEBSUB_HUB ? WEBSUB_HUB : undefined;
@ -60,6 +62,6 @@ export async function saveAtomFeed(feed: Feed) {
body: params
});
} catch (e) {
log.error('Failed to update WebSub hub', e);
logger.error('Failed to update WebSub hub', e);
}
}