PawSQLite/src/log.mjs

17 lines
344 B
JavaScript
Raw Normal View History

2021-03-01 18:47:07 -08:00
let DEBUG = false;
export function log(...args) {
if (DEBUG) {
console.log(...args);
}
}
export function enableDebug(active) {
DEBUG = !!active;
log("PawSQLite: debugging " + (DEBUG ? "enabled" : "disabled"));
if (DEBUG) {
log("You might also want to enable debugging for the adapter that you " +
"are using");
}
2021-03-01 18:47:07 -08:00
}