Skip to content

Commit d804e5c

Browse files
committed
chore: modify debug namespace
1 parent 08e2549 commit d804e5c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"publish": "nr prepublishOnly && esno scripts/publish.ts",
4848
"release": "esno scripts/release.ts",
4949
"start": "esno src/index.ts",
50-
"test": "DEBUG=ora-stack:* vitest",
50+
"test": "DEBUG=DEBUG:ora-stack:* vitest",
5151
"typecheck": "tsc --noEmit"
5252
},
5353
"devDependencies": {

packages/utils/src/common/debug.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
/* eslint-disable no-console */
12
import debugFn from 'debug'
23

34
export function debug(workspace: string) {
4-
return debugFn(`ora-stack:${workspace}`)
5+
const d = debugFn(`DEBUG:ora-stack:${workspace}`)
6+
d.log = (...args: any[]) => {
7+
console.log(...args)
8+
}
9+
return d
510
}

0 commit comments

Comments
 (0)