- clear formatters while creating the spdlog logger

- fix name of the logger
This commit is contained in:
Sandeep Somavarapu
2021-11-10 10:26:02 +01:00
parent 262f25a211
commit 37acec6394
9 changed files with 32 additions and 44 deletions

View File

@@ -14,11 +14,7 @@ export class ExtHostLoggerService extends BaseExtHostLoggerService {
protected override doCreateLogger(resource: URI, logLevel: LogLevel, options?: ILoggerOptions): ILogger {
if (resource.scheme === Schemas.file) {
const logger = new SpdLogLogger(options?.name || generateUuid(), resource.fsPath, !options?.donotRotate, logLevel);
if (options?.donotUseFormatters) {
(<SpdLogLogger>logger).clearFormatters();
}
return logger;
return new SpdLogLogger(options?.name || generateUuid(), resource.fsPath, !options?.donotRotate, !!options?.donotUseFormatters, logLevel);
}
return super.doCreateLogger(resource, logLevel, options);
}