MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / shouldLog

Function shouldLog

src/utils/logger.ts:227–242  ·  view source on GitHub ↗

* Check if a log level should be output based on client settings * @param level The log level to check * @returns true if the message should be logged

(level: string)

Source from the content-addressed store, hash-verified

225 * @returns true if the message should be logged
226 */
227function shouldLog(level: string): boolean {
228 if (isTestEnv() && !logFileStream) {
229 return false;
230 }
231
232 if (clientLogLevel === 'none') {
233 return false;
234 }
235
236 const levelKey = level.toLowerCase() as LogLevel;
237 if (!(levelKey in LOG_LEVELS)) {
238 return true;
239 }
240
241 return LOG_LEVELS[levelKey] <= LOG_LEVELS[clientLogLevel];
242}
243
244/**
245 * Log a message with the specified level

Callers 1

logFunction · 0.85

Calls 1

isTestEnvFunction · 0.70

Tested by

no test coverage detected