@@ -1625,11 +1625,9 @@ export class DefaultClient implements Client {
16251625 updateLanguageConfigurations ( ) ;
16261626 }
16271627 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 ) {
16331631 const out : Logger = getOutputChannelLogger ( ) ;
16341632 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 ) ) ;
16351633 }
@@ -2598,7 +2596,7 @@ export class DefaultClient implements Client {
25982596 testHook . updateStatus ( status ) ;
25992597 } else if ( message . endsWith ( "IntelliSense done" ) ) {
26002598 const settings : CppSettings = new CppSettings ( ) ;
2601- if ( settings . loggingLevel === "Debug" ) {
2599+ if ( util . getNumericLoggingLevel ( settings . loggingLevel ) >= 6 ) {
26022600 const out : Logger = getOutputChannelLogger ( ) ;
26032601 const duration : number = Date . now ( ) - timeStamp ;
26042602 out . appendLine ( localize ( "update.intellisense.time" , "Update IntelliSense time (sec): {0}" , duration / 1000 ) ) ;
@@ -3030,7 +3028,7 @@ export class DefaultClient implements Client {
30303028
30313029 const settings : CppSettings = new CppSettings ( ) ;
30323030 const out : Logger = getOutputChannelLogger ( ) ;
3033- if ( settings . loggingLevel === "Debug" ) {
3031+ if ( util . getNumericLoggingLevel ( settings . loggingLevel ) >= 6 ) {
30343032 out . appendLine ( localize ( "configurations.received" , "Custom configurations received:" ) ) ;
30353033 }
30363034 const sanitized : SourceFileConfigurationItemAdapter [ ] = [ ] ;
@@ -3044,7 +3042,7 @@ export class DefaultClient implements Client {
30443042 uri = item . uri . toString ( ) ;
30453043 }
30463044 this . configurationLogging . set ( uri , JSON . stringify ( item . configuration , null , 4 ) ) ;
3047- if ( settings . loggingLevel === "Debug" ) {
3045+ if ( util . getNumericLoggingLevel ( settings . loggingLevel ) >= 6 ) {
30483046 out . appendLine ( ` uri: ${ uri } ` ) ;
30493047 out . appendLine ( ` config: ${ JSON . stringify ( item . configuration , null , 2 ) } ` ) ;
30503048 }
@@ -3148,7 +3146,7 @@ export class DefaultClient implements Client {
31483146 }
31493147
31503148 const settings : CppSettings = new CppSettings ( ) ;
3151- if ( settings . loggingLevel === "Debug" ) {
3149+ if ( util . getNumericLoggingLevel ( settings . loggingLevel ) >= 6 ) {
31523150 const out : Logger = getOutputChannelLogger ( ) ;
31533151 out . appendLine ( localize ( "browse.configuration.received" , "Custom browse configuration received: {0}" , JSON . stringify ( sanitized , null , 2 ) ) ) ;
31543152 }
0 commit comments