From 9716684fbbaf22d20164d29c6c9b487119cac070 Mon Sep 17 00:00:00 2001 From: eric2788 Date: Wed, 10 Jan 2024 22:50:07 +0800 Subject: [PATCH] added logger inject --- src/contents/index/index.tsx | 1 + src/logger.ts | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 src/logger.ts diff --git a/src/contents/index/index.tsx b/src/contents/index/index.tsx index ae5d1764..02014e84 100644 --- a/src/contents/index/index.tsx +++ b/src/contents/index/index.tsx @@ -11,6 +11,7 @@ import styleText from '~styles'; import createApp from './mounter'; import '~toaster'; +import '~logger'; export const config: PlasmoCSConfig = { diff --git a/src/logger.ts b/src/logger.ts new file mode 100644 index 00000000..46f172f9 --- /dev/null +++ b/src/logger.ts @@ -0,0 +1,4 @@ +console.info = console.log.bind(console, '[bilibili-vup-stream-enhancer]') +console.warn = console.log.bind(console, '[bilibili-vup-stream-enhancer]') +console.error = console.log.bind(console, '[bilibili-vup-stream-enhancer]') +console.debug = console.log.bind(console, '[bilibili-vup-stream-enhancer]') \ No newline at end of file