mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FIX] Исправлены уровни логгирования для некоторых сообщений
This commit is contained in:
parent
aceb06bc9d
commit
6db5d818b0
2 changed files with 5 additions and 7 deletions
|
@ -409,6 +409,7 @@ public static Process launch(
|
|||
}
|
||||
args.add(JVMHelper.jvmProperty(LogHelper.DEBUG_PROPERTY, Boolean.toString(LogHelper.isDebugEnabled())));
|
||||
args.add(JVMHelper.jvmProperty(LogHelper.STACKTRACE_PROPERTY, Boolean.toString(LogHelper.isStacktraceEnabled())));
|
||||
args.add(JVMHelper.jvmProperty(LogHelper.DEV_PROPERTY, Boolean.toString(LogHelper.isDevEnabled())));
|
||||
if (LauncherConfig.ADDRESS_OVERRIDE != null)
|
||||
args.add(JVMHelper.jvmProperty(LauncherConfig.ADDRESS_OVERRIDE_PROPERTY, LauncherConfig.ADDRESS_OVERRIDE));
|
||||
if (JVMHelper.OS_TYPE == OS.MUSTDIE) {
|
||||
|
|
|
@ -34,7 +34,6 @@ public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOEx
|
|||
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
|
||||
FileVisitResult result = super.preVisitDirectory(dir, attrs);
|
||||
if (DirWatcher.this.dir.equals(dir)) {
|
||||
LogHelper.subInfo("DirWatcher register V1 %s %s", dir.toString(), result.toString());
|
||||
dir.register(service, KINDS);
|
||||
return result;
|
||||
}
|
||||
|
@ -42,12 +41,10 @@ public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) th
|
|||
// Maybe it's unnecessary to go deeper
|
||||
path.add(IOHelper.getFileName(dir));
|
||||
if (matcher != null && !matcher.shouldVerify(path)) {
|
||||
LogHelper.subInfo("DirWatcher skipped %s %s", dir.toString(), result.toString());
|
||||
return FileVisitResult.SKIP_SUBTREE;
|
||||
}
|
||||
|
||||
// Register
|
||||
LogHelper.subInfo("DirWatcher register V2 %s %s", dir.toString(), result.toString());
|
||||
dir.register(service, KINDS);
|
||||
return result;
|
||||
}
|
||||
|
@ -124,7 +121,7 @@ private void processKey(WatchKey key) throws IOException {
|
|||
|
||||
// Resolve paths and verify is not exclusion
|
||||
Path path = watchDir.resolve((Path) event.context());
|
||||
LogHelper.subInfo("DirWatcher event %s", path.toString());
|
||||
LogHelper.debug("DirWatcher event %s", path.toString());
|
||||
Deque<String> stringPath = toPath(dir.relativize(path));
|
||||
if (matcher != null && !matcher.shouldVerify(stringPath))
|
||||
continue; // Exclusion; should not be verified
|
||||
|
@ -143,10 +140,10 @@ private void processKey(WatchKey key) throws IOException {
|
|||
}
|
||||
|
||||
private void processLoop() throws IOException, InterruptedException {
|
||||
LogHelper.info("WatchService start processing");
|
||||
LogHelper.debug("WatchService start processing");
|
||||
while (!Thread.interrupted())
|
||||
processKey(service.take());
|
||||
LogHelper.info("WatchService closed");
|
||||
LogHelper.debug("WatchService closed");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -155,7 +152,7 @@ public void run() {
|
|||
try {
|
||||
processLoop();
|
||||
} catch (InterruptedException | ClosedWatchServiceException ignored) {
|
||||
LogHelper.info("WatchService closed 2");
|
||||
LogHelper.debug("WatchService closed 2");
|
||||
// Do nothing (closed etc)
|
||||
} catch (Throwable exc) {
|
||||
handleError(exc);
|
||||
|
|
Loading…
Reference in a new issue