Browse Source

Merge pull request #42 from vlsi/logging_verbosity

Reduce verbosity of Loading icon logging messages
pull/44/head
Jannis Weis 5 years ago committed by GitHub
parent
commit
69f689ac73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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