MCPcopy Create free account
hub / github.com/aurelia/framework / developmentLogging

Method developmentLogging

src/framework-configuration.ts:473–490  ·  view source on GitHub ↗

* Plugs in the ConsoleAppender and sets the log level to debug. * @param level The log level (none/error/warn/info/debug), default to 'debug'. * @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.

(level?: string)

Source from the content-addressed store, hash-verified

471 * @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
472 */
473 developmentLogging(level?: string): FrameworkConfiguration {
474 let logLevel = level ? TheLogManager.logLevel[level] : undefined;
475
476 if (logLevel === undefined) {
477 logLevel = TheLogManager.logLevel.debug;
478 }
479
480 this.preTask(() => {
481 return this.aurelia.loader.normalize('aurelia-logging-console', this.bootstrapperName).then(name => {
482 return this.aurelia.loader.loadModule(name).then(m => {
483 TheLogManager.addAppender(new m.ConsoleAppender());
484 TheLogManager.setLevel(logLevel);
485 });
486 });
487 });
488
489 return this;
490 }
491
492 /**
493 * Loads and configures the plugins registered with this instance.

Callers

nothing calls this directly

Calls 1

preTaskMethod · 0.95

Tested by

no test coverage detected