mirror of
https://gitlab.com/mangadex-pub/mangadex_at_home.git
synced 2024-01-19 02:48:37 +00:00
Adjust logback graceful close
This commit is contained in:
parent
5e407a9e81
commit
f02c47ca1f
|
@ -1,5 +1,6 @@
|
||||||
package mdnet.base;
|
package mdnet.base;
|
||||||
|
|
||||||
|
import ch.qos.logback.classic.LoggerContext;
|
||||||
import mdnet.base.settings.ClientSettings;
|
import mdnet.base.settings.ClientSettings;
|
||||||
import mdnet.base.server.ApplicationKt;
|
import mdnet.base.server.ApplicationKt;
|
||||||
import mdnet.base.server.WebUiKt;
|
import mdnet.base.server.WebUiKt;
|
||||||
|
@ -262,10 +263,12 @@ public class MangaDexClient {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOGGER.error("Cache failed to close", e);
|
LOGGER.error("Cache failed to close", e);
|
||||||
}
|
}
|
||||||
executorService.shutdown();
|
|
||||||
readyToExit.set(true);
|
readyToExit.set(true);
|
||||||
};
|
};
|
||||||
while (!readyToExit.get()) {
|
while (!readyToExit.get()) {
|
||||||
}
|
}
|
||||||
|
executorService.shutdown();
|
||||||
|
LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
|
||||||
|
loggerContext.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<shutdownHook class="ch.qos.logback.core.hook.DelayingShutdownHook"/>
|
|
||||||
|
|
||||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<immediateFlush>false</immediateFlush>
|
<immediateFlush>false</immediateFlush>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue