Skip to content

Commit

Permalink
disable the enabling of logging when loading debugging
Browse files Browse the repository at this point in the history
SQUASHED: AUTO-COMMIT-src-client-debug.js,
  • Loading branch information
JensLincke committed Feb 7, 2024
1 parent 20b2162 commit 802398b
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/client/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var debugPrintReverseMap = new Map() // string -> obj

export {Logging}

function debugPrint(element) {
export function debugPrint(element) {
var print = debugPrintMap.get(element)
if (!print) {
var className = element.constructor.name
Expand Down Expand Up @@ -41,13 +41,16 @@ export function debugSet(name, obj) {
return debugPrintReverseMap.set(name, ref)
}

Logging.enable()

Logging.setLog((element, ...args) => {

if (element && element instanceof HTMLElement ) {
console.log(debugPrint(element), ...args)
}
})
if (false) {
Logging.enable()

Logging.setLog((element, ...args) => {

if (element && element instanceof HTMLElement ) {
console.log(debugPrint(element), ...args)
}
})
}


0 comments on commit 802398b

Please sign in to comment.