@@ -16,7 +16,6 @@ import {
16
16
import { LanguageServerType } from '../activation/types' ;
17
17
import './extensions' ;
18
18
import { IInterpreterAutoSelectionProxyService } from '../interpreter/autoSelection/types' ;
19
- import { LogLevel } from '../logging/levels' ;
20
19
import { sendTelemetryEvent } from '../telemetry' ;
21
20
import { EventName } from '../telemetry/constants' ;
22
21
import { sendSettingTelemetry } from '../telemetry/envFileTelemetry' ;
@@ -36,12 +35,10 @@ import {
36
35
IFormattingSettings ,
37
36
IInterpreterPathService ,
38
37
ILintingSettings ,
39
- ILoggingSettings ,
40
38
IPythonSettings ,
41
39
ISortImportSettings ,
42
40
ITensorBoardSettings ,
43
41
ITerminalSettings ,
44
- LoggingLevelSettingType ,
45
42
Resource ,
46
43
} from './types' ;
47
44
import { debounceSync } from './utils/decorators' ;
@@ -137,8 +134,6 @@ export class PythonSettings implements IPythonSettings {
137
134
138
135
public languageServerIsDefault = true ;
139
136
140
- public logging : ILoggingSettings = { level : LogLevel . Error } ;
141
-
142
137
protected readonly changed = new EventEmitter < void > ( ) ;
143
138
144
139
private workspaceRoot : Resource ;
@@ -305,15 +300,6 @@ export class PythonSettings implements IPythonSettings {
305
300
this . devOptions = systemVariables . resolveAny ( pythonSettings . get < any [ ] > ( 'devOptions' ) ) ! ;
306
301
this . devOptions = Array . isArray ( this . devOptions ) ? this . devOptions : [ ] ;
307
302
308
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
309
- const loggingSettings = systemVariables . resolveAny ( pythonSettings . get < any > ( 'logging' ) ) ! ;
310
- loggingSettings . level = convertSettingTypeToLogLevel ( loggingSettings . level ) ;
311
- if ( this . logging ) {
312
- Object . assign < ILoggingSettings , ILoggingSettings > ( this . logging , loggingSettings ) ;
313
- } else {
314
- this . logging = loggingSettings ;
315
- }
316
-
317
303
const lintingSettings = systemVariables . resolveAny ( pythonSettings . get < ILintingSettings > ( 'linting' ) ) ! ;
318
304
if ( this . linting ) {
319
305
Object . assign < ILintingSettings , ILintingSettings > ( this . linting , lintingSettings ) ;
@@ -709,23 +695,3 @@ function isValidPythonPath(pythonPath: string): boolean {
709
695
path . basename ( getOSType ( ) === OSType . Windows ? pythonPath . toLowerCase ( ) : pythonPath ) . startsWith ( 'python' )
710
696
) ;
711
697
}
712
-
713
- function convertSettingTypeToLogLevel ( setting : LoggingLevelSettingType | undefined ) : LogLevel | 'off' {
714
- switch ( setting ) {
715
- case 'info' : {
716
- return LogLevel . Info ;
717
- }
718
- case 'warn' : {
719
- return LogLevel . Warn ;
720
- }
721
- case 'off' : {
722
- return 'off' ;
723
- }
724
- case 'debug' : {
725
- return LogLevel . Debug ;
726
- }
727
- default : {
728
- return LogLevel . Error ;
729
- }
730
- }
731
- }
0 commit comments