1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { AbstractLogger, ILogger, ILoggerService } from 'vs/platform/log/common/log';
import { IEditSessionsLogService } from 'vs/workbench/contrib/editSessions/common/editSessions';
export class EditSessionsLogService extends AbstractLogger implements IEditSessionsLogService {
declare readonly _serviceBrand: undefined;
private readonly logger: ILogger;
constructor(
@ILoggerService loggerService: ILoggerService,
@IEnvironmentService environmentService: IEnvironmentService
) {
super();
this.logger = this._register(loggerService.createLogger(environmentService.editSessionsLogResource, { name: 'editsessions' }));
}
trace(message: string, ...args: any[]): void {
this.logger.trace(message, ...args);
}
debug(message: string, ...args: any[]): void {
this.logger.debug(message, ...args);
}
info(message: string, ...args: any[]): void {
this.logger.info(message, ...args);
}
warn(message: string, ...args: any[]): void {
this.logger.warn(message, ...args);
}
error(message: string | Error, ...args: any[]): void {
this.logger.error(message, ...args);
}
critical(message: string | Error, ...args: any[]): void {
this.logger.critical(message, ...args);
}
flush(): void {
this.logger.flush();
}
}
|