Skip to content

Commit 9243533

Browse files
add debug logger
1 parent 636d94b commit 9243533

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

bun.lockb

699 Bytes
Binary file not shown.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"license": "MIT",
3535
"devDependencies": {
3636
"@types/bun": "^1.1.2",
37+
"@types/debug": "^4.1.12",
3738
"@typescript-eslint/eslint-plugin": "^7.9.0",
3839
"@typescript-eslint/parser": "^7.9.0",
3940
"elysia": "^1.0.20",

src/services/logger.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import debug from "debug"
2+
3+
export const logger = (unit: string, formatter: any, ...params: any[]) =>
4+
debug("elysia-ip:" + unit)(formatter, ...params)

0 commit comments

Comments
 (0)