#72906 Restructure spdlog service

This commit is contained in:
Sandeep Somavarapu
2019-05-27 15:26:48 +02:00
parent 25e9e092c2
commit 4026f653b4
7 changed files with 89 additions and 44 deletions
+2 -2
View File
@@ -31,7 +31,6 @@ import { mkdirp, writeFile } from 'vs/base/node/pfs';
import { getBaseLabel } from 'vs/base/common/labels';
import { IStateService } from 'vs/platform/state/common/state';
import { StateService } from 'vs/platform/state/node/stateService';
import { createBufferSpdLogService } from 'vs/platform/log/node/spdlogService';
import { ILogService, getLogLevel } from 'vs/platform/log/common/log';
import { isPromiseCanceledError } from 'vs/base/common/errors';
import { areSameExtensions, adoptToGalleryExtensionId, getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
@@ -41,6 +40,7 @@ import { IExtensionManifest, ExtensionType, isLanguagePackExtension } from 'vs/p
import { CancellationToken } from 'vs/base/common/cancellation';
import { LocalizationsService } from 'vs/platform/localizations/node/localizations';
import { Schemas } from 'vs/base/common/network';
import { SpdLogService } from 'vs/platform/log/node/spdlogService';
const notFound = (id: string) => localize('notFound', "Extension '{0}' not found.", id);
const notInstalled = (id: string) => localize('notInstalled', "Extension '{0}' is not installed.", id);
@@ -279,7 +279,7 @@ export function main(argv: ParsedArgs): Promise<void> {
const services = new ServiceCollection();
const environmentService = new EnvironmentService(argv, process.execPath);
const logService = createBufferSpdLogService('cli', getLogLevel(environmentService), environmentService.logsPath);
const logService: ILogService = new SpdLogService('cli', environmentService.logsPath, getLogLevel(environmentService));
process.once('exit', () => logService.dispose());
logService.info('main', argv);