Browse Source

Fixed log formatting for library loggers.

pull/170/head
weisj 5 years ago
parent
commit
c08f660e2e
  1. 3
      macos/src/main/java/com/github/weisj/darklaf/platform/macos/MacOSLibrary.java
  2. 8
      native-utils/src/main/java/com/github/weisj/darklaf/platform/AbstractLibrary.java
  3. 3
      windows/src/main/java/com/github/weisj/darklaf/platform/windows/WindowsLibrary.java

3
macos/src/main/java/com/github/weisj/darklaf/platform/macos/MacOSLibrary.java

@ -25,6 +25,7 @@
package com.github.weisj.darklaf.platform.macos; package com.github.weisj.darklaf.platform.macos;
import com.github.weisj.darklaf.platform.AbstractLibrary; import com.github.weisj.darklaf.platform.AbstractLibrary;
import com.github.weisj.darklaf.util.LogUtil;
import com.github.weisj.darklaf.util.SystemInfo; import com.github.weisj.darklaf.util.SystemInfo;
public class MacOSLibrary extends AbstractLibrary { public class MacOSLibrary extends AbstractLibrary {
@ -38,7 +39,7 @@ public class MacOSLibrary extends AbstractLibrary {
} }
protected MacOSLibrary() { protected MacOSLibrary() {
super(PATH, DLL_NAME); super(PATH, DLL_NAME, LogUtil.getLogger(MacOSLibrary.class));
} }
@Override @Override

8
native-utils/src/main/java/com/github/weisj/darklaf/platform/AbstractLibrary.java

@ -35,10 +35,14 @@ public abstract class AbstractLibrary {
private boolean loaded; private boolean loaded;
private boolean attemptedLoad; private boolean attemptedLoad;
protected AbstractLibrary(final String path, final String libraryName) { public AbstractLibrary(final String path, final String libraryName) {
this(path, libraryName, Logger.getLogger(libraryName));
}
public AbstractLibrary(final String path, final String libraryName, final Logger logger) {
this.path = path; this.path = path;
this.libraryName = libraryName; this.libraryName = libraryName;
logger = Logger.getLogger(libraryName); this.logger = logger;
} }
/** /**

3
windows/src/main/java/com/github/weisj/darklaf/platform/windows/WindowsLibrary.java

@ -25,6 +25,7 @@
package com.github.weisj.darklaf.platform.windows; package com.github.weisj.darklaf.platform.windows;
import com.github.weisj.darklaf.platform.AbstractLibrary; import com.github.weisj.darklaf.platform.AbstractLibrary;
import com.github.weisj.darklaf.util.LogUtil;
import com.github.weisj.darklaf.util.SystemInfo; import com.github.weisj.darklaf.util.SystemInfo;
public class WindowsLibrary extends AbstractLibrary { public class WindowsLibrary extends AbstractLibrary {
@ -40,7 +41,7 @@ public class WindowsLibrary extends AbstractLibrary {
} }
protected WindowsLibrary() { protected WindowsLibrary() {
super(PATH, DLL_NAME); super(PATH, DLL_NAME, LogUtil.getLogger(WindowsLibrary.class));
} }
@Override @Override

Loading…
Cancel
Save