@@ -1625,11 +1625,9 @@ export class DefaultClient implements Client {
1625
1625
updateLanguageConfigurations ( ) ;
1626
1626
}
1627
1627
if ( changedSettings . loggingLevel ) {
1628
- const oldLoggingLevelLogged : boolean = ! ! this . loggingLevel && this . loggingLevel !== 0 && this . loggingLevel !== 1 ;
1629
- const newLoggingLevel : string | undefined = changedSettings . loggingLevel ;
1630
- this . loggingLevel = util . getNumericLoggingLevel ( newLoggingLevel ) ;
1631
- const newLoggingLevelLogged : boolean = ! ! newLoggingLevel && newLoggingLevel !== "None" && newLoggingLevel !== "Error" ;
1632
- if ( oldLoggingLevelLogged || newLoggingLevelLogged ) {
1628
+ const oldLoggingLevelLogged : boolean = this . loggingLevel > 1 ;
1629
+ this . loggingLevel = util . getNumericLoggingLevel ( changedSettings . loggingLevel ) ;
1630
+ if ( oldLoggingLevelLogged || this . loggingLevel > 1 ) {
1633
1631
const out : Logger = getOutputChannelLogger ( ) ;
1634
1632
out . appendLine ( localize ( { key : "loggingLevel.changed" , comment : [ "{0} is the setting name 'loggingLevel', {1} is a string value such as 'Debug'" ] } , "{0} has changed to: {1}" , "loggingLevel" , changedSettings . loggingLevel ) ) ;
1635
1633
}
@@ -2598,7 +2596,7 @@ export class DefaultClient implements Client {
2598
2596
testHook . updateStatus ( status ) ;
2599
2597
} else if ( message . endsWith ( "IntelliSense done" ) ) {
2600
2598
const settings : CppSettings = new CppSettings ( ) ;
2601
- if ( settings . loggingLevel === "Debug" ) {
2599
+ if ( util . getNumericLoggingLevel ( settings . loggingLevel ) >= 6 ) {
2602
2600
const out : Logger = getOutputChannelLogger ( ) ;
2603
2601
const duration : number = Date . now ( ) - timeStamp ;
2604
2602
out . appendLine ( localize ( "update.intellisense.time" , "Update IntelliSense time (sec): {0}" , duration / 1000 ) ) ;
@@ -3030,7 +3028,7 @@ export class DefaultClient implements Client {
3030
3028
3031
3029
const settings : CppSettings = new CppSettings ( ) ;
3032
3030
const out : Logger = getOutputChannelLogger ( ) ;
3033
- if ( settings . loggingLevel === "Debug" ) {
3031
+ if ( util . getNumericLoggingLevel ( settings . loggingLevel ) >= 6 ) {
3034
3032
out . appendLine ( localize ( "configurations.received" , "Custom configurations received:" ) ) ;
3035
3033
}
3036
3034
const sanitized : SourceFileConfigurationItemAdapter [ ] = [ ] ;
@@ -3044,7 +3042,7 @@ export class DefaultClient implements Client {
3044
3042
uri = item . uri . toString ( ) ;
3045
3043
}
3046
3044
this . configurationLogging . set ( uri , JSON . stringify ( item . configuration , null , 4 ) ) ;
3047
- if ( settings . loggingLevel === "Debug" ) {
3045
+ if ( util . getNumericLoggingLevel ( settings . loggingLevel ) >= 6 ) {
3048
3046
out . appendLine ( ` uri: ${ uri } ` ) ;
3049
3047
out . appendLine ( ` config: ${ JSON . stringify ( item . configuration , null , 2 ) } ` ) ;
3050
3048
}
@@ -3148,7 +3146,7 @@ export class DefaultClient implements Client {
3148
3146
}
3149
3147
3150
3148
const settings : CppSettings = new CppSettings ( ) ;
3151
- if ( settings . loggingLevel === "Debug" ) {
3149
+ if ( util . getNumericLoggingLevel ( settings . loggingLevel ) >= 6 ) {
3152
3150
const out : Logger = getOutputChannelLogger ( ) ;
3153
3151
out . appendLine ( localize ( "browse.configuration.received" , "Custom browse configuration received: {0}" , JSON . stringify ( sanitized , null , 2 ) ) ) ;
3154
3152
}
0 commit comments