Allow warn and error to bypass the dev-only logging

This commit is contained in:
Oliver 2025-12-07 13:22:04 -07:00
parent 27c5fccba0
commit b2c22be84c

View file

@ -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;
};