IntelliJ Themes: use CONFIG log level for reporting invalid colors so that they do not show up in the console by default (issue #26)

This commit is contained in:
Karl Tauber
2019-12-23 15:30:57 +01:00
parent 20ccc2951e
commit ea351935b2
2 changed files with 5 additions and 5 deletions

View File

@@ -245,7 +245,7 @@ public class IntelliJTheme
try { try {
uiValue = UIDefaultsLoader.parseValue( key, valueStr ); uiValue = UIDefaultsLoader.parseValue( key, valueStr );
} catch( RuntimeException ex ) { } catch( RuntimeException ex ) {
UIDefaultsLoader.logParseError( key, valueStr, ex ); UIDefaultsLoader.logParseError( Level.CONFIG, key, valueStr, ex );
return; // ignore invalid value return; // ignore invalid value
} }
} }

View File

@@ -146,7 +146,7 @@ class UIDefaultsLoader
try { try {
globals.put( key.substring( GLOBAL_PREFIX.length() ), parseValue( key, value, resolver, addonClassLoaders ) ); globals.put( key.substring( GLOBAL_PREFIX.length() ), parseValue( key, value, resolver, addonClassLoaders ) );
} catch( RuntimeException ex ) { } catch( RuntimeException ex ) {
logParseError( key, value, ex ); logParseError( Level.SEVERE, key, value, ex );
} }
} }
@@ -171,7 +171,7 @@ class UIDefaultsLoader
try { try {
defaults.put( key, parseValue( key, value, resolver, addonClassLoaders ) ); defaults.put( key, parseValue( key, value, resolver, addonClassLoaders ) );
} catch( RuntimeException ex ) { } catch( RuntimeException ex ) {
logParseError( key, value, ex ); logParseError( Level.SEVERE, key, value, ex );
} }
} }
} catch( IOException ex ) { } catch( IOException ex ) {
@@ -179,8 +179,8 @@ class UIDefaultsLoader
} }
} }
static void logParseError( String key, String value, RuntimeException ex ) { static void logParseError( Level level, String key, String value, RuntimeException ex ) {
FlatLaf.LOG.log( Level.SEVERE, "FlatLaf: Failed to parse: '" + key + '=' + value + '\'', ex ); FlatLaf.LOG.log( level, "FlatLaf: Failed to parse: '" + key + '=' + value + '\'', ex );
} }
private static String resolveValue( Properties properties, String value ) { private static String resolveValue( Properties properties, String value ) {