Skip to content

Commit 9c5ae6c

Browse files
committed
debug log improvement
1 parent 420555a commit 9c5ae6c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/quickjs-emscripten-core/src/debug.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ export function isDebugMode() {
2323
*/
2424
export function debugLog(...args: any[]) {
2525
if (QTS_DEBUG) {
26-
console.log(...args)
26+
console.log("quickjs-emscripten:", ...args)
2727
}
2828
}

packages/quickjs-emscripten-core/src/runtime.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type {
88
} from "@jitl/quickjs-ffi-types"
99
import { maybeAsyncFn } from "./asyncify-helpers"
1010
import { QuickJSContext } from "./context"
11-
import { QTS_DEBUG, debugLog } from "./debug"
11+
import { QTS_DEBUG } from "./debug"
1212
import { QuickJSWrongOwner } from "./errors"
1313
import type { Disposable } from "./lifetime"
1414
import { DisposableResult, Lifetime, Scope, UsingDisposable } from "./lifetime"
@@ -362,7 +362,7 @@ export class QuickJSRuntime extends UsingDisposable implements Disposable {
362362
*/
363363
debugLog(...msg: unknown[]) {
364364
if (this._debugMode) {
365-
console.log("QuickJS:", ...msg)
365+
console.log("quickjs-emscripten:", ...msg)
366366
}
367367
}
368368

0 commit comments

Comments
 (0)