@@ -13,12 +13,11 @@ import { StopWatch } from '../../../common/utils/stopWatch';
13
13
import { EXTENSION_ROOT_DIR } from '../../../constants' ;
14
14
15
15
class DebugSessionLoggingTracker implements DebugAdapterTracker {
16
- private readonly session : DebugSession ;
17
16
private readonly enabled : boolean = false ;
18
17
private stream : fs . WriteStream | undefined ;
19
18
private timer = new StopWatch ( ) ;
20
19
21
- constructor ( session : DebugSession , fileSystem : IFileSystem ) {
20
+ constructor ( private readonly session : DebugSession , fileSystem : IFileSystem ) {
22
21
this . session = session ;
23
22
this . enabled = this . session . configuration . logToFile as boolean ;
24
23
if ( this . enabled ) {
@@ -33,15 +32,15 @@ class DebugSessionLoggingTracker implements DebugAdapterTracker {
33
32
}
34
33
35
34
public onWillReceiveMessage ( message : DebugProtocol . Message ) {
36
- this . log ( `Client <-- Adapter:\n${ this . stringify ( message ) } \n` ) ;
35
+ this . log ( `Client --> Adapter:\n${ this . stringify ( message ) } \n` ) ;
37
36
}
38
37
39
38
public onDidSendMessage ( message : DebugProtocol . Message ) {
40
- this . log ( `Client --> Adapter:\n${ this . stringify ( message ) } \n` ) ;
39
+ this . log ( `Client <-- Adapter:\n${ this . stringify ( message ) } \n` ) ;
41
40
}
42
41
43
42
public onWillStopSession ( ) {
44
- this . log ( ` Stopping Session\n` ) ;
43
+ this . log ( ' Stopping Session\n' ) ;
45
44
}
46
45
47
46
public onError ( error : Error ) {
@@ -65,10 +64,7 @@ class DebugSessionLoggingTracker implements DebugAdapterTracker {
65
64
66
65
@injectable ( )
67
66
export class DebugSessionLoggingFactory implements DebugAdapterTrackerFactory {
68
- constructor (
69
- @inject ( IFileSystem ) private readonly fileSystem : IFileSystem
70
- ) {
71
- }
67
+ constructor ( @inject ( IFileSystem ) private readonly fileSystem : IFileSystem ) { }
72
68
73
69
public createDebugAdapterTracker ( session : DebugSession ) : ProviderResult < DebugAdapterTracker > {
74
70
return new DebugSessionLoggingTracker ( session , this . fileSystem ) ;
0 commit comments