Browse Source

Reduce verbosity of Loading icon logging messages

pull/42/head
Vladimir Sitnikov 5 years ago
parent
commit
5779e7ec6b
  1. 4
      core/src/main/java/com/github/weisj/darklaf/LafManager.java
  2. 2
      core/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java
  3. 2
      core/src/main/java/com/github/weisj/darklaf/icons/LazyIcon.java

4
core/src/main/java/com/github/weisj/darklaf/LafManager.java

@ -65,10 +65,10 @@ public final class LafManager {
try (InputStream inputStream = DarkLaf.class.getClassLoader()
.getResourceAsStream("com/github/weisj/darklaf/log/logging.properties")) {
if (inputStream != null) {
Logger.getGlobal().info("Loading logging configuration.");
Logger.getGlobal().fine("Loading logging configuration.");
LogManager.getLogManager().readConfiguration(inputStream);
}
Logger.getGlobal().info("Loaded logging config" + LogManager.getLogManager().toString());
Logger.getGlobal().fine(() -> "Loaded logging config" + LogManager.getLogManager().toString());
} catch (IOException e) {
Logger.getGlobal().log(Level.SEVERE, "init logging system", e);
}

2
core/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java

@ -87,7 +87,7 @@ public class DarkSVGIcon implements Icon, Serializable {
private void ensureLoaded() {
if (!loaded.get()) {
LOGGER.info("Loading icon '" + uri.toASCIIString() + "'.");
LOGGER.fine(() -> "Loading icon '" + uri.toASCIIString() + "'.");
icon.setSvgURI(uri);
loaded.set(true);
}

2
core/src/main/java/com/github/weisj/darklaf/icons/LazyIcon.java

@ -55,7 +55,7 @@ public abstract class LazyIcon implements Icon, UIResource {
private void ensureLoaded() {
if (!loaded) {
LOGGER.info("Loading icon '" + path + "'. Resolving from " + parentClass);
LOGGER.fine(() -> "Loading icon '" + path + "'. Resolving from " + parentClass);
icon = loadIcon();
loaded = true;
if (icon == null) {

Loading…
Cancel
Save