6
6
import { Disposable , DisposableStore } from 'vs/base/common/lifecycle' ;
7
7
import { Action2 , MenuId , registerAction2 } from 'vs/platform/actions/common/actions' ;
8
8
import { IProductService } from 'vs/platform/product/common/productService' ;
9
- import { CONFIGURATION_KEY_HOST_NAME , CONFIGURATION_KEY_PREFIX , ConnectionInfo , IRemoteTunnelService } from 'vs/platform/remoteTunnel/common/remoteTunnel' ;
9
+ import { CONFIGURATION_KEY_HOST_NAME , CONFIGURATION_KEY_PREFIX , ConnectionInfo , IRemoteTunnelService , LOGGER_NAME , LOG_CHANNEL_ID , LOG_FILE_NAME } from 'vs/platform/remoteTunnel/common/remoteTunnel' ;
10
10
import { AuthenticationSession , AuthenticationSessionsChangeEvent , IAuthenticationService } from 'vs/workbench/services/authentication/common/authentication' ;
11
11
import { localize } from 'vs/nls' ;
12
12
import { IWorkbenchContributionsRegistry , Extensions as WorkbenchExtensions , IWorkbenchContribution } from 'vs/workbench/common/contributions' ;
@@ -21,7 +21,7 @@ import { INativeEnvironmentService } from 'vs/platform/environment/common/enviro
21
21
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions' ;
22
22
import { IStringDictionary } from 'vs/base/common/collections' ;
23
23
import { IQuickInputService , IQuickPickItem , IQuickPickSeparator , QuickPickItem } from 'vs/platform/quickinput/common/quickInput' ;
24
- import { IOutputService } from 'vs/workbench/services/output/common/output' ;
24
+ import { IOutputService , registerLogChannel } from 'vs/workbench/services/output/common/output' ;
25
25
import { IFileService } from 'vs/platform/files/common/files' ;
26
26
import { IConfigurationRegistry , Extensions as ConfigurationExtensions , ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry' ;
27
27
import { IProgress , IProgressService , IProgressStep , ProgressLocation } from 'vs/platform/progress/common/progress' ;
@@ -32,11 +32,11 @@ import { IPreferencesService } from 'vs/workbench/services/preferences/common/pr
32
32
import { IOpenerService } from 'vs/platform/opener/common/opener' ;
33
33
import { Action } from 'vs/base/common/actions' ;
34
34
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService' ;
35
- import * as Constants from 'vs/workbench/contrib/logs/common/logConstants' ;
36
35
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace' ;
37
36
import { Schemas } from 'vs/base/common/network' ;
38
37
import { URI } from 'vs/base/common/uri' ;
39
38
import { joinPath } from 'vs/base/common/resources' ;
39
+ import { join } from 'vs/base/common/path' ;
40
40
41
41
export const REMOTE_TUNNEL_CATEGORY : ILocalizedString = {
42
42
original : 'Remote Tunnels' ,
@@ -106,7 +106,9 @@ export class RemoteTunnelWorkbenchContribution extends Disposable implements IWo
106
106
) {
107
107
super ( ) ;
108
108
109
- this . logger = this . _register ( loggerService . createLogger ( environmentService . remoteTunnelLogResource , { name : 'remoteTunnel' } ) ) ;
109
+ const remoteTunnelServiceLogResource = URI . file ( join ( environmentService . logsPath , LOG_FILE_NAME ) ) ;
110
+
111
+ this . logger = this . _register ( loggerService . createLogger ( remoteTunnelServiceLogResource , { name : LOGGER_NAME } ) ) ;
110
112
111
113
this . connectionStateContext = REMOTE_TUNNEL_CONNECTION_STATE . bindTo ( this . contextKeyService ) ;
112
114
@@ -153,6 +155,7 @@ export class RemoteTunnelWorkbenchContribution extends Disposable implements IWo
153
155
this . initialize ( true ) ;
154
156
}
155
157
158
+ registerLogChannel ( LOG_CHANNEL_ID , localize ( 'remoteTunnelLog' , "Remote Tunnel Service" ) , remoteTunnelServiceLogResource , fileService , logService ) ;
156
159
}
157
160
158
161
private get existingSessionId ( ) {
@@ -542,7 +545,7 @@ export class RemoteTunnelWorkbenchContribution extends Disposable implements IWo
542
545
543
546
async run ( accessor : ServicesAccessor ) {
544
547
const outputService = accessor . get ( IOutputService ) ;
545
- outputService . showChannel ( Constants . remoteTunnelLogChannelId ) ;
548
+ outputService . showChannel ( LOG_CHANNEL_ID ) ;
546
549
}
547
550
} ) ) ;
548
551
0 commit comments