update logging
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user