MCPcopy Create free account
hub / github.com/angular/dev-infra / runConsoleCommand

Function runConsoleCommand

ng-dev/utils/logging.ts:85–90  ·  view source on GitHub ↗

* Run the console command provided, if the environments logging level greater than the * provided logging level. * * The loadCommand takes in a function which is called to retrieve the console.* function * to allow for jasmine spies to still work in testing. Without this method of retrieval *

(loadCommand: () => Function, logLevel: LogLevel, ...text: unknown[])

Source from the content-addressed store, hash-verified

83 * function before jasmine can spy.
84 */
85function runConsoleCommand(loadCommand: () => Function, logLevel: LogLevel, ...text: unknown[]) {
86 if (getLogLevel() >= logLevel) {
87 loadCommand()(...text);
88 }
89 appendToLogFile(logLevel, ...text);
90}
91
92/**
93 * Retrieve the log level from environment variables, if the value found

Callers 1

buildLogLevelFunctionFunction · 0.85

Calls 2

getLogLevelFunction · 0.85
appendToLogFileFunction · 0.85

Tested by

no test coverage detected