Path: blob/main/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import * as nls from '../../../../../nls.js';6import { Disposable } from '../../../../../base/common/lifecycle.js';7import { INotebookLoggingService } from '../../common/notebookLoggingService.js';8import { ILogger, ILoggerService } from '../../../../../platform/log/common/log.js';9import { windowLogGroup } from '../../../../services/log/common/logConstants.js';1011const logChannelId = 'notebook.rendering';1213export class NotebookLoggingService extends Disposable implements INotebookLoggingService {14_serviceBrand: undefined;1516static ID: string = 'notebook';17private readonly _logger: ILogger;1819constructor(20@ILoggerService loggerService: ILoggerService,21) {22super();23this._logger = this._register(loggerService.createLogger(logChannelId, { name: nls.localize('renderChannelName', "Notebook"), group: windowLogGroup }));24}2526debug(category: string, output: string): void {27this._logger.debug(`[${category}] ${output}`);28}2930info(category: string, output: string): void {31this._logger.info(`[${category}] ${output}`);32}3334warn(category: string, output: string): void {35this._logger.warn(`[${category}] ${output}`);36}3738error(category: string, output: string): void {39this._logger.error(`[${category}] ${output}`);40}41}42434445