just log everything sadly

This commit is contained in:
0d0 2025-04-19 18:50:10 +02:00
parent e3c0c7d1f9
commit 716ebe9ecd
4 changed files with 13 additions and 10 deletions

View file

@ -1,12 +1,12 @@
import formats from '$lib/common/supportedFormats.json';
import winston from 'winston';
import { dev } from '$app/environment';
export const logger = winston.createLogger({
level: import.meta.env.DEV ? 'debug' : 'error',
level: 'debug',
format: winston.format.json(),
transports: [new winston.transports.Console()]
});
logger.debug(import.meta.env.DEV)
const formatMime = new Map(Object.entries(formats));
export const isURLValid = (url: string) => {
try {

View file

@ -41,6 +41,8 @@ export const GET: RequestHandler = async ({ url }) => {
let filename = '';
let contentLength = 0;
logger.debug(`Requested: ${link}`);
try {
logger.debug(`Fetching video data to set filename`);
// Fetch metadata for filename