just log everything sadly
This commit is contained in:
parent
e3c0c7d1f9
commit
716ebe9ecd
4 changed files with 13 additions and 10 deletions
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue