MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / _maybeLog

Function _maybeLog

packages/core/src/utils/debug-logger.ts:96–106  ·  view source on GitHub ↗
(level: ConsoleLevel, ...args: Parameters<(typeof console)[typeof level]>)

Source from the content-addressed store, hash-verified

94}
95
96function _maybeLog(level: ConsoleLevel, ...args: Parameters<(typeof console)[typeof level]>): void {
97 if (!DEBUG_BUILD) {
98 return;
99 }
100
101 if (isEnabled()) {
102 consoleSandbox(() => {
103 GLOBAL_OBJ.console[level](`${PREFIX}[${level}]:`, ...args);
104 });
105 }
106}
107
108function _getLoggerSettings(): { enabled: boolean } {
109 if (!DEBUG_BUILD) {

Callers 3

logFunction · 0.85
warnFunction · 0.85
errorFunction · 0.85

Calls 2

consoleSandboxFunction · 0.85
isEnabledFunction · 0.70

Tested by

no test coverage detected