log.ts ×5

Frontier kind: Code frontier

unlabeled · c_680c83e73fd2

22 tests · 14081 LOC · 60 files · introduces 0 tests · 36 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges36 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1979 ranges14081 lines · 60 files · Browse complete extent
All tests (intent)
22 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 36 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/log/common/log.ts 36 introduced LOC · 5 ranges

Open complete file

727
728 createLogger(idOrResource: URI | string, options?: ILoggerOptions): ILogger {
729 > const resource = this.toResource(idOrResource); log.ts
730 > const id = isString(idOrResource) ? idOrResource : (options?.id ?? hash(resource.toString()).toString(16));
731 > let logger = this._loggers.get(resource)?.logger;
732 > const logLevel = options?.logLevel === 'always' ? LogLevel.Trace : options?.logLevel;
733 > if (!logger) {
734 > logger = this.doCreateLogger(resource, logLevel ?? this.getLogLevel(resource) ?? this.logLevel, { ...options, id });
735 > }
736 > const loggerEntry: LoggerEntry = {
737 > logger,
738 > info: {
739 > resource,
740 > id,
741 > logLevel,
742 > name: options?.name,
743 > hidden: options?.hidden,
744 > group: options?.group,
745 > extensionId: options?.extensionId,
746 > when: options?.when
747 > }
748 > };
749 > this.registerLogger(loggerEntry.info);
750 > // TODO: @sandy081 Remove this once registerLogger can take ILogger
751 > this._loggers.set(resource, loggerEntry);
752 > return logger;
753 > }
754
755 protected toResource(idOrResource: string | URI): URI {
756 > return isString(idOrResource) ? joinPath(this.logsHome, `${idOrResource.replace(/[\\/:\*\?"<>\|]/g, '')}.log`) : idOrResource; log.ts
757 > }
758
759 setLogLevel(logLevel: LogLevel): void;
793 let logLevel;
794 if (resource) {
795 > logLevel = this._loggers.get(resource)?.info.logLevel; log.ts
796 > }
797 return logLevel ?? this.logLevel;
798 }
799
800 registerLogger(resource: ILoggerResource): void {
801 > const existing = this._loggers.get(resource.resource); log.ts
802 > if (existing) {
803 if (existing.info.hidden !== resource.hidden) {
804 this.setVisibility(resource.resource, !resource.hidden);
805 }
806 > } else { log.ts
807 > this._loggers.set(resource.resource, { info: resource, logger: undefined });
808 > this._onDidChangeLoggers.fire({ added: [resource], removed: [] });
809 > }
810 > }
811
812 deregisterLogger(idOrResource: URI | string): void {