Allow warn and error to bypass the dev-only logging
This commit is contained in:
parent
27c5fccba0
commit
b2c22be84c
1 changed files with 6 additions and 1 deletions
|
|
@ -13,6 +13,11 @@ const augmentedProps = new Set([
|
|||
`timeStamp`,
|
||||
]);
|
||||
|
||||
const happensInProd = new Set([
|
||||
`warn`,
|
||||
`error`,
|
||||
]);
|
||||
|
||||
function noop() {};
|
||||
|
||||
/** @type {null | boolean} */
|
||||
|
|
@ -26,7 +31,7 @@ export const Logger = new Proxy(console, {
|
|||
inDev = game.modules.get(__ID).flags.inDev;
|
||||
};
|
||||
|
||||
if (!inDev) {
|
||||
if (!inDev && !happensInProd.has(prop)) {
|
||||
return noop;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue