MCPcopy
hub / github.com/webpack/webpack / shouldLog

Function shouldLog

hot/log.js:12–18  ·  view source on GitHub ↗

* @param {LogLevel} level log level * @returns {boolean} true, if should log

(level)

Source from the content-addressed store, hash-verified

10 * @returns {boolean} true, if should log
11 */
12function shouldLog(level) {
13 var shouldLog =
14 (logLevel === "info" && level === "info") ||
15 (["info", "warning"].indexOf(logLevel) >= 0 && level === "warning") ||
16 (["info", "warning", "error"].indexOf(logLevel) >= 0 && level === "error");
17 return shouldLog;
18}
19
20/**
21 * @param {(msg?: string) => void} logFn log function

Callers 2

logGroupFunction · 0.85
log.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected