[New] Updated jersey dependency
This commit is contained in:
parent
9d8f7ec1dc
commit
5449020a7f
|
@ -1,14 +1,14 @@
|
|||
package li.strolch.agent.api;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.MalformedURLException;
|
||||
|
||||
import ch.qos.logback.classic.LoggerContext;
|
||||
import ch.qos.logback.classic.util.ContextInitializer;
|
||||
import ch.qos.logback.core.joran.spi.JoranException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.MalformedURLException;
|
||||
|
||||
public class LoggingLoader {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(LoggingLoader.class);
|
||||
|
@ -25,13 +25,13 @@ public class LoggingLoader {
|
|||
"Not changing logback configuration as " + logConfigFile.getAbsolutePath() + " does not exist.");
|
||||
} else {
|
||||
if (!(LoggerFactory.getILoggerFactory() instanceof LoggerContext loggerContext)) {
|
||||
logger.error(logConfigFile.getAbsolutePath()
|
||||
+ " exists, but LoggerFactory is not instance of ch.qos.logback.classic.LoggerContext. Ignoring.");
|
||||
logger.error(logConfigFile.getAbsolutePath() +
|
||||
" exists, but LoggerFactory is not instance of ch.qos.logback.classic.LoggerContext. Ignoring.");
|
||||
} else {
|
||||
logger.info(logConfigFile.getAbsolutePath() + " file exists. Reloading logging configuration from "
|
||||
+ logConfigFile);
|
||||
logger.info(logConfigFile.getAbsolutePath() + " file exists. Reloading logging configuration from " +
|
||||
logConfigFile);
|
||||
try {
|
||||
//loggerContext.reset();
|
||||
loggerContext.reset();
|
||||
new ContextInitializer(loggerContext).configureByResource(logConfigFile.toURI().toURL());
|
||||
logger.info("Reloaded logger configuration from " + logConfigFile.getAbsolutePath());
|
||||
lastConfigFile = logConfigFile;
|
||||
|
@ -39,8 +39,8 @@ public class LoggingLoader {
|
|||
try {
|
||||
new ContextInitializer(loggerContext).autoConfig();
|
||||
} catch (JoranException e1) {
|
||||
logger.error("Failed to reload original config after failure to load new config from "
|
||||
+ logConfigFile.getAbsolutePath(), e);
|
||||
logger.error("Failed to reload original config after failure to load new config from " +
|
||||
logConfigFile.getAbsolutePath(), e);
|
||||
}
|
||||
logger.error("Failed to reload logback configuration from file " + logConfigFile, e);
|
||||
}
|
||||
|
@ -55,10 +55,10 @@ public class LoggingLoader {
|
|||
reloadLogging(lastConfigFile.getParentFile());
|
||||
} else {
|
||||
if (!(LoggerFactory.getILoggerFactory() instanceof LoggerContext loggerContext)) {
|
||||
logger.error("LoggerFactory is not instance of " + LoggerContext.class.getName()
|
||||
+ ". Ignoring request to reload configuration!");
|
||||
System.out.println("LoggerFactory is not instance of " + LoggerContext.class.getName()
|
||||
+ ". Ignoring request to reload configuration!");
|
||||
logger.error("LoggerFactory is not instance of " + LoggerContext.class.getName() +
|
||||
". Ignoring request to reload configuration!");
|
||||
System.out.println("LoggerFactory is not instance of " + LoggerContext.class.getName() +
|
||||
". Ignoring request to reload configuration!");
|
||||
} else {
|
||||
logger.info(
|
||||
"Resetting logging configuration using auto config as no previous config fila available...");
|
||||
|
@ -74,4 +74,13 @@ public class LoggingLoader {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void reset() {
|
||||
if (!(LoggerFactory.getILoggerFactory() instanceof LoggerContext loggerContext)) {
|
||||
logger.error("LoggerFactory is not instance of ch.qos.logback.classic.LoggerContext. Ignoring.");
|
||||
} else {
|
||||
logger.info("Resetting LoggerFactory " + loggerContext);
|
||||
loggerContext.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -97,7 +97,7 @@
|
|||
<jakarta.ws.rs-api.version>3.1.0</jakarta.ws.rs-api.version>
|
||||
<jakarta.servlet-api.version>6.0.0</jakarta.servlet-api.version>
|
||||
<jakarta.websocket.version>2.1.0</jakarta.websocket.version>
|
||||
<jersey.version>3.1.0</jersey.version>
|
||||
<jersey.version>3.1.2</jersey.version>
|
||||
|
||||
<camel.version>3.19.0</camel.version>
|
||||
<hapi.version>2.3</hapi.version>
|
||||
|
|
Loading…
Reference in New Issue