82 lines
2.3 KiB
JavaScript
82 lines
2.3 KiB
JavaScript
// Metro module 824 (f825).
|
|
import { GLOBAL_OBJ } from "./Module821";
|
|
import { DEBUG_BUILD } from "./Module823";
|
|
import { getGlobalSingleton } from "./Module825";
|
|
function $mk67071() {
|
|
return () => ({
|
|
enabled: false
|
|
});
|
|
}
|
|
let c666_2, _maybeLog;
|
|
const consoleSandbox = function consoleSandbox(a0) {
|
|
let r25;
|
|
if ("console" in GLOBAL_OBJ) {
|
|
let $mk67069 = function() {
|
|
return (a0) => {
|
|
console2[a0] = c12496_1[a0];
|
|
};
|
|
};
|
|
const console2 = GLOBAL_OBJ.console;
|
|
let c12496_1 = {};
|
|
const r21 = Object.keys(c666_2);
|
|
r21.forEach((item) => {
|
|
const r7 = c666_2[item];
|
|
c12496_1[item] = console2[item];
|
|
console2[item] = r7;
|
|
});
|
|
try {
|
|
r25 = a0();
|
|
} catch (r29) {
|
|
r21.forEach($mk67069());
|
|
throw r29;
|
|
}
|
|
r21.forEach($mk67069());
|
|
return r25;
|
|
}
|
|
return a0();
|
|
};
|
|
_maybeLog = function _maybeLog(c12497_0, ...c12497_1) {
|
|
if (DEBUG_BUILD && (DEBUG_BUILD ? getGlobalSingleton("loggerSettings", $mk67071()) : {
|
|
enabled: false
|
|
}).enabled) {
|
|
consoleSandbox(() => {
|
|
const console3 = GLOBAL_OBJ.console;
|
|
console3[c12497_0].apply(console3, [`Sentry Logger [${c12497_0}]:`, ...c12497_1]);
|
|
});
|
|
}
|
|
};
|
|
Object.defineProperty(exports, Symbol.toStringTag, {
|
|
value: "Module"
|
|
});
|
|
c666_2 = {};
|
|
const r16 = {
|
|
enable: function enable() {
|
|
(DEBUG_BUILD ? getGlobalSingleton("loggerSettings", $mk67071()) : {
|
|
enabled: false
|
|
}).enabled = true;
|
|
},
|
|
disable: function disable() {
|
|
(DEBUG_BUILD ? getGlobalSingleton("loggerSettings", $mk67071()) : {
|
|
enabled: false
|
|
}).enabled = false;
|
|
},
|
|
isEnabled: function isEnabled() {
|
|
return (DEBUG_BUILD ? getGlobalSingleton("loggerSettings", $mk67071()) : {
|
|
enabled: false
|
|
}).enabled;
|
|
},
|
|
log: function log() {
|
|
_maybeLog.apply(void 0, ["log", ...Array.prototype.slice.call(arguments, 0)]);
|
|
},
|
|
warn: function warn() {
|
|
_maybeLog.apply(void 0, ["warn", ...Array.prototype.slice.call(arguments, 0)]);
|
|
},
|
|
error: function error() {
|
|
_maybeLog.apply(void 0, ["error", ...Array.prototype.slice.call(arguments, 0)]);
|
|
}
|
|
};
|
|
export const CONSOLE_LEVELS = ["debug", "info", "warn", "error", "log", "assert", "trace"];
|
|
export { consoleSandbox };
|
|
export { r16 as debug };
|
|
export { c666_2 as originalConsoleMethods };
|