fix logger
This commit is contained in:
@ -7,13 +7,11 @@ import {
|
||||
enqueueProcessYouTubeVideo,
|
||||
enqueueTriggerRuleJob,
|
||||
} from './utils/createTask'
|
||||
import { buildLogger } from './utils/logger'
|
||||
import { logger } from './utils/logger'
|
||||
import { isYouTubeVideoURL } from './utils/youtube'
|
||||
|
||||
export type EntityEvent = { id: string }
|
||||
|
||||
const logger = buildLogger('pubsub')
|
||||
|
||||
const client = new PubSub()
|
||||
|
||||
export const createPubSubClient = (): PubsubClient => {
|
||||
|
||||
@ -31,7 +31,7 @@ export class CustomTypeOrmLogger
|
||||
|
||||
constructor(options?: TypeOrmLoggerOptions) {
|
||||
super(options)
|
||||
this.logger = buildLogger('typeorm')
|
||||
this.logger = logger
|
||||
}
|
||||
|
||||
logQuery(query: string, parameters?: any[], queryRunner?: QueryRunner) {
|
||||
|
||||
@ -33,7 +33,7 @@ import {
|
||||
makeHighlightNodeAttributes,
|
||||
} from './highlightGenerator'
|
||||
import { createImageProxyUrl } from './imageproxy'
|
||||
import { buildLogger, LogRecord } from './logger'
|
||||
import { logger, LogRecord } from './logger'
|
||||
|
||||
interface Feed {
|
||||
title: string
|
||||
@ -43,7 +43,6 @@ interface Feed {
|
||||
description?: string
|
||||
}
|
||||
|
||||
const logger = buildLogger('utils.parse')
|
||||
const signToken = promisify(jwt.sign)
|
||||
|
||||
const axiosInstance = axios.create({
|
||||
@ -670,7 +669,7 @@ export const htmlToHighlightedMarkdown = (
|
||||
throw new Error('Invalid html content')
|
||||
}
|
||||
} catch (err) {
|
||||
logger.info(err)
|
||||
logger.error(err)
|
||||
return nhm.translate(/* html */ html)
|
||||
}
|
||||
|
||||
@ -690,7 +689,7 @@ export const htmlToHighlightedMarkdown = (
|
||||
articleTextNodes
|
||||
)
|
||||
} catch (err) {
|
||||
logger.info(err)
|
||||
logger.error(err)
|
||||
}
|
||||
})
|
||||
html = document.documentElement.outerHTML
|
||||
|
||||
Reference in New Issue
Block a user