rename log service to logger

This commit is contained in:
Sandeep Somavarapu
2021-02-05 11:38:28 +01:00
parent cf0b1a8926
commit cdc8628d55
23 changed files with 101 additions and 109 deletions

View File

@@ -3,21 +3,21 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ILogService, DelegatedLogService, LogLevel } from 'vs/platform/log/common/log';
import { ILogService, LogService, LogLevel } from 'vs/platform/log/common/log';
import { ExtHostLogServiceShape } from 'vs/workbench/api/common/extHost.protocol';
import { ExtensionHostLogFileName } from 'vs/workbench/services/extensions/common/extensions';
import { IExtHostInitDataService } from 'vs/workbench/api/common/extHostInitDataService';
import { Schemas } from 'vs/base/common/network';
import { SpdLogService } from 'vs/platform/log/node/spdlogService';
import { SpdLogLogger } from 'vs/platform/log/node/spdlogLog';
import { dirname } from 'vs/base/common/resources';
export class ExtHostLogService extends DelegatedLogService implements ILogService, ExtHostLogServiceShape {
export class ExtHostLogService extends LogService implements ILogService, ExtHostLogServiceShape {
constructor(
@IExtHostInitDataService initData: IExtHostInitDataService,
) {
if (initData.logFile.scheme !== Schemas.file) { throw new Error('Only file-logging supported'); }
super(new SpdLogService(ExtensionHostLogFileName, dirname(initData.logFile).fsPath, initData.logLevel));
super(new SpdLogLogger(ExtensionHostLogFileName, dirname(initData.logFile).fsPath, initData.logLevel));
}
$setLevel(level: LogLevel): void {