From 844b2a3feabfcb2f90f5e5e97f5cbf9320c594c0 Mon Sep 17 00:00:00 2001 From: agrabil Date: Mon, 28 Sep 2020 21:46:03 -0400 Subject: [PATCH] Release version 3.0.1 Fixes #20: Replace Log4j with Log4j2 - Update Maven dependencies - Migrate log4j.properties to log4j2.xml Fixes #21: Correct default configuration file processing - Use qualified 'file:' URL for finding resource Additional updates: - Reorder config schema elements - v4 before v6 - Add Logging section to user guide - Update release notes --- Jagornet-DHCP/dhcp-client/pom.xml | 6 +- .../src/main/resources/log4j2-testclient.xml | 29 ++ .../resources/testclient_log4j.properties | 34 -- Jagornet-DHCP/dhcp-core/pom.xml | 2 +- Jagornet-DHCP/dhcp-server/.gitignore | 1 + .../org.eclipse.core.resources.prefs | 1 - .../dhcp-server/config/dhcpserver-basic.xml | 10 +- .../dhcp-server/config/dhcpserver-sample.xml | 10 +- .../dhcp-server/config/dhcpserver.xml | 10 +- .../dhcp-server/config/dhcpserver.xsd | 488 +++++++++--------- .../dhcp-server/config/log4j.properties | 32 -- Jagornet-DHCP/dhcp-server/config/log4j2.xml | 29 ++ .../dhcp-server/docs/release-notes.txt | 6 + Jagornet-DHCP/dhcp-server/pom.xml | 10 +- .../src/main/asciidoc/userguide.adoc | 28 +- .../dhcp/server/JagornetDhcpServer.java | 17 +- .../config/DhcpServerConfiguration.java | 28 +- .../dhcp/server/netty/NettyDhcpServer.java | 4 +- .../src/main/resources/dhcpserver.xsd | 488 +++++++++--------- .../config/TestDhcpServerConfiguration.java | 2 +- .../resources/dhcpserver-test-config-save.xml | 2 +- .../test/resources/log4j-backup.properties | 32 -- .../resources/log4j-restclient.properties | 32 -- .../test/resources/log4j-server.properties | 32 -- .../src/test/resources/log4j.properties | 32 -- .../src/test/resources/log4j2-backup.xml | 29 ++ .../src/test/resources/log4j2-restclient.xml | 29 ++ .../src/test/resources/log4j2-server.xml | 29 ++ .../dhcp-server/src/test/resources/log4j2.xml | 29 ++ Jagornet-DHCP/pom.xml | 22 +- 30 files changed, 751 insertions(+), 752 deletions(-) create mode 100644 Jagornet-DHCP/dhcp-client/src/main/resources/log4j2-testclient.xml delete mode 100644 Jagornet-DHCP/dhcp-client/src/main/resources/testclient_log4j.properties delete mode 100644 Jagornet-DHCP/dhcp-server/config/log4j.properties create mode 100644 Jagornet-DHCP/dhcp-server/config/log4j2.xml delete mode 100644 Jagornet-DHCP/dhcp-server/src/test/resources/log4j-backup.properties delete mode 100644 Jagornet-DHCP/dhcp-server/src/test/resources/log4j-restclient.properties delete mode 100644 Jagornet-DHCP/dhcp-server/src/test/resources/log4j-server.properties delete mode 100644 Jagornet-DHCP/dhcp-server/src/test/resources/log4j.properties create mode 100644 Jagornet-DHCP/dhcp-server/src/test/resources/log4j2-backup.xml create mode 100644 Jagornet-DHCP/dhcp-server/src/test/resources/log4j2-restclient.xml create mode 100644 Jagornet-DHCP/dhcp-server/src/test/resources/log4j2-server.xml create mode 100644 Jagornet-DHCP/dhcp-server/src/test/resources/log4j2.xml diff --git a/Jagornet-DHCP/dhcp-client/pom.xml b/Jagornet-DHCP/dhcp-client/pom.xml index 0922a34d..559cdf5d 100644 --- a/Jagornet-DHCP/dhcp-client/pom.xml +++ b/Jagornet-DHCP/dhcp-client/pom.xml @@ -4,7 +4,7 @@ com.jagornet jagornet-dhcp-all - 3.0.0 + 3.0.1 jagornet-dhcp-client @@ -13,12 +13,12 @@ com.jagornet jagornet-dhcp-core - 3.0.0 + 3.0.1 com.jagornet jagornet-dhcp-server - 3.0.0 + 3.0.1 commons-cli diff --git a/Jagornet-DHCP/dhcp-client/src/main/resources/log4j2-testclient.xml b/Jagornet-DHCP/dhcp-client/src/main/resources/log4j2-testclient.xml new file mode 100644 index 00000000..a0637a98 --- /dev/null +++ b/Jagornet-DHCP/dhcp-client/src/main/resources/log4j2-testclient.xml @@ -0,0 +1,29 @@ + + + + + + + + + + %d [%t] %-5p %c{2} - %m%n + + + + + + + + + + + + + + + + + diff --git a/Jagornet-DHCP/dhcp-client/src/main/resources/testclient_log4j.properties b/Jagornet-DHCP/dhcp-client/src/main/resources/testclient_log4j.properties deleted file mode 100644 index a334812a..00000000 --- a/Jagornet-DHCP/dhcp-client/src/main/resources/testclient_log4j.properties +++ /dev/null @@ -1,34 +0,0 @@ -# ************************************************************************ -# log4j.properties - the logging configuration file for the DHCP server -# This file is referenced via -Dlog4j.configuration system property. -# ************************************************************************ - -# For the general syntax of property based configuration files see -# the documentation of org.apache.log4j.PropertyConfigurator. - -log4j.rootCategory=INFO, Console, Logfile - -# Console is set to be a ConsoleAppender. -log4j.appender.Console=org.apache.log4j.ConsoleAppender - -# Console uses PatternLayout -log4j.appender.Console.layout=org.apache.log4j.PatternLayout -# Print time offset -log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} (%x)[%t] %-5p %c{1} - %m%n -log4j.appender.Console.threshold=INFO - -# Logfile is a RollingFileAppender -log4j.appender.Logfile=org.apache.log4j.RollingFileAppender -log4j.appender.Logfile.MaxFileSize=10MB -log4j.appender.Logfile.MaxBackupIndex=10 -log4j.appender.Logfile.File=${jagornet.dhcp.home}/log/testclient.log -# No buffering. -log4j.appender.Logfile.ImmediateFlush=true - -# Appender Logfile uses the PatternLayout. -log4j.appender.Logfile.layout=org.apache.log4j.PatternLayout -log4j.appender.Logfile.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} - %m%n - -log4j.category.com.jagornet=DEBUG - - diff --git a/Jagornet-DHCP/dhcp-core/pom.xml b/Jagornet-DHCP/dhcp-core/pom.xml index f77bd389..b9148bba 100644 --- a/Jagornet-DHCP/dhcp-core/pom.xml +++ b/Jagornet-DHCP/dhcp-core/pom.xml @@ -4,7 +4,7 @@ com.jagornet jagornet-dhcp-all - 3.0.0 + 3.0.1 jagornet-dhcp-core diff --git a/Jagornet-DHCP/dhcp-server/.gitignore b/Jagornet-DHCP/dhcp-server/.gitignore index b1c32929..1332f71a 100644 --- a/Jagornet-DHCP/dhcp-server/.gitignore +++ b/Jagornet-DHCP/dhcp-server/.gitignore @@ -1,3 +1,4 @@ /target/ /dist/ /log/ +/db/ diff --git a/Jagornet-DHCP/dhcp-server/.settings/org.eclipse.core.resources.prefs b/Jagornet-DHCP/dhcp-server/.settings/org.eclipse.core.resources.prefs index 02454b68..29abf999 100644 --- a/Jagornet-DHCP/dhcp-server/.settings/org.eclipse.core.resources.prefs +++ b/Jagornet-DHCP/dhcp-server/.settings/org.eclipse.core.resources.prefs @@ -3,5 +3,4 @@ encoding//src/main/java=UTF-8 encoding//src/main/resources=UTF-8 encoding//src/test/java=UTF-8 encoding//src/test/resources=UTF-8 -encoding//target/generated-sources/jaxb=UTF-8 encoding/=UTF-8 diff --git a/Jagornet-DHCP/dhcp-server/config/dhcpserver-basic.xml b/Jagornet-DHCP/dhcp-server/config/dhcpserver-basic.xml index 985cda8e..f31343a0 100644 --- a/Jagornet-DHCP/dhcp-server/config/dhcpserver-basic.xml +++ b/Jagornet-DHCP/dhcp-server/config/dhcpserver-basic.xml @@ -3,6 +3,11 @@ + + + + 10.0.0.2 + @@ -10,11 +15,6 @@ Jagornet - - - - 10.0.0.2 - diff --git a/Jagornet-DHCP/dhcp-server/config/dhcpserver-sample.xml b/Jagornet-DHCP/dhcp-server/config/dhcpserver-sample.xml index 5ffabc75..30a00aa9 100644 --- a/Jagornet-DHCP/dhcp-server/config/dhcpserver-sample.xml +++ b/Jagornet-DHCP/dhcp-server/config/dhcpserver-sample.xml @@ -3,6 +3,11 @@ + + + + 10.0.0.2 + @@ -11,11 +16,6 @@ - - - 10.0.0.2 - - diff --git a/Jagornet-DHCP/dhcp-server/config/dhcpserver.xml b/Jagornet-DHCP/dhcp-server/config/dhcpserver.xml index 15169ed4..8b546c14 100644 --- a/Jagornet-DHCP/dhcp-server/config/dhcpserver.xml +++ b/Jagornet-DHCP/dhcp-server/config/dhcpserver.xml @@ -1,11 +1,5 @@ - - - 000100015F4BB4E2CA268E9E606F - - - - 127.0.0.1 - + + diff --git a/Jagornet-DHCP/dhcp-server/config/dhcpserver.xsd b/Jagornet-DHCP/dhcp-server/config/dhcpserver.xsd index 9cb66d16..78a2bb4d 100644 --- a/Jagornet-DHCP/dhcp-server/config/dhcpserver.xsd +++ b/Jagornet-DHCP/dhcp-server/config/dhcpserver.xsd @@ -10,12 +10,15 @@ - + + + + @@ -34,9 +37,6 @@ - - - @@ -67,6 +67,32 @@ + + + + The configuration options are options that have registered codes with + IANA and are defined by RFC's. This list includes only those options + that can be configured for the DHCPv4 server to provide to clients. + Other options, that is options sent from the client to the server, + are defined below for use in forming client filter expressions. + + + + + + + + + + + + + + + + + + @@ -103,32 +129,6 @@ - - - - The configuration options are options that have registered codes with - IANA and are defined by RFC's. This list includes only those options - that can be configured for the DHCPv4 server to provide to clients. - Other options, that is options sent from the client to the server, - are defined below for use in forming client filter expressions. - - - - - - - - - - - - - - - - - - @@ -151,6 +151,9 @@ + + + @@ -169,9 +172,6 @@ - - - @@ -192,10 +192,10 @@ + - @@ -235,12 +235,19 @@ - + + + + + + + + @@ -270,19 +277,42 @@ - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -354,36 +384,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -493,9 +493,9 @@ + - @@ -617,6 +617,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1005,177 +1176,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + %d [%t] %-5p %c{2} - %m%n + + + + + + + + + + + + + + + + + diff --git a/Jagornet-DHCP/dhcp-server/docs/release-notes.txt b/Jagornet-DHCP/dhcp-server/docs/release-notes.txt index fe15c1b0..2d1172fe 100644 --- a/Jagornet-DHCP/dhcp-server/docs/release-notes.txt +++ b/Jagornet-DHCP/dhcp-server/docs/release-notes.txt @@ -1,3 +1,9 @@ +Changes in 3.0.1 +---------------- + - Fixes #20: Replace Log4j with Log4j2 + - Fixes #21: Correct default configuration file processing + - Reorder config schema elements - v4 before v6 + Features/Changes in 3.0.0 ------------------------- - Java 8 diff --git a/Jagornet-DHCP/dhcp-server/pom.xml b/Jagornet-DHCP/dhcp-server/pom.xml index 05f79e04..23af4bce 100644 --- a/Jagornet-DHCP/dhcp-server/pom.xml +++ b/Jagornet-DHCP/dhcp-server/pom.xml @@ -4,13 +4,13 @@ com.jagornet jagornet-dhcp-all - 3.0.0 + 3.0.1 jagornet-dhcp-server - 3.0.0 + 3.0.1 1.2 2.7.0 2.6 @@ -27,6 +27,8 @@ 2.3.0.1 2.3.2 1.1.1 + 1.3.2 + 4.5.12 @@ -190,12 +192,12 @@ javax.annotation javax.annotation-api - 1.3.2 + ${javax.annotation.version} org.apache.httpcomponents httpclient - 4.5.12 + ${httpclient.version} diff --git a/Jagornet-DHCP/dhcp-server/src/main/asciidoc/userguide.adoc b/Jagornet-DHCP/dhcp-server/src/main/asciidoc/userguide.adoc index f926299e..b3eb3726 100644 --- a/Jagornet-DHCP/dhcp-server/src/main/asciidoc/userguide.adoc +++ b/Jagornet-DHCP/dhcp-server/src/main/asciidoc/userguide.adoc @@ -1,10 +1,10 @@ = Jagornet DHCP Server {appversion}: Community Edition User Guide :doctype: book :author: A. Gregory Rabil -:email: +:email: greg.rabil@jagornet.com :homepage: http://jagornet.com[Jagornet Technologies, LLC] :appversion: 3.0 -:appbuild: 0 +:appbuild: 1 :toc: {author} {email} @@ -93,7 +93,7 @@ Enable DHCPv4 and DHCPv6 UDP port traffic on all intervening network equipment. The main Java class of the Jagornet DHCP Server supports the following usage: usage: com.jagornet.dhcp.server.JagornetDhcpServer [options] - Jagornet DHCP Server Community Edition 3.0.0 + Jagornet DHCP Server Community Edition 3.0.1 Copyright Jagornet Technologies 2009-2020. All Rights Reserved. -4b,--v4bcast DHCPv4 broadcast interface (default = none). Use this option to specify the interface for @@ -291,6 +291,18 @@ Startup examples: %JAGORNET_DHCP_HOME%\bin\dhcpserver start -c conf\my-dhcpserver.xml -6u 2001:db8::1 -6m eth0 eth1 +=== Logging +Logging for the Jagornet DHCP server is performed using the +https://logging.apache.org/log4j/2.x/[Apache Log4j 2] logging +logging service. The Log4j2 configuration file is located in the `config/log4j2.xml` +file. The server writes all initial startup messages to the standard output and +error streams. After the server initialization, all messages will be written to +the `log/dhcpserver.log` file. When the file reaches 10MB, it is "rolled" over to a +new `log/dhcpserver-#.log` file up to ten files of logging history. These settings are +controlled by the +https://logging.apache.org/log4j/2.x/manual/appenders.html#RollingFileAppender[Log4j2 RollingFileAppender] +for details. + == Configuration === Hierarchy The Jagornet DHCP server is configured via the `config/dhcpserver.xml` XML document. @@ -907,9 +919,7 @@ follows: - - - + Using this default configuration, the default IP address of the host will be set @@ -947,11 +957,7 @@ follows: - - - - - + Using this default configuration, a DUID-LLT, as defined by section 9.2 of RFC 3315, diff --git a/Jagornet-DHCP/dhcp-server/src/main/java/com/jagornet/dhcp/server/JagornetDhcpServer.java b/Jagornet-DHCP/dhcp-server/src/main/java/com/jagornet/dhcp/server/JagornetDhcpServer.java index f6ee4f50..7370665b 100644 --- a/Jagornet-DHCP/dhcp-server/src/main/java/com/jagornet/dhcp/server/JagornetDhcpServer.java +++ b/Jagornet-DHCP/dhcp-server/src/main/java/com/jagornet/dhcp/server/JagornetDhcpServer.java @@ -27,7 +27,6 @@ import java.io.IOException; import java.io.PrintWriter; -import java.lang.management.ManagementFactory; import java.net.Inet4Address; import java.net.Inet6Address; import java.net.InetAddress; @@ -41,8 +40,6 @@ import java.util.Enumeration; import java.util.List; -import javax.management.MBeanServer; -import javax.management.ObjectName; import javax.xml.bind.JAXBException; import org.apache.commons.cli.BasicParser; @@ -53,9 +50,6 @@ import org.apache.commons.cli.OptionBuilder; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; -import org.apache.log4j.LogManager; -import org.apache.log4j.jmx.HierarchyDynamicMBean; -import org.apache.log4j.spi.LoggerRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationContext; @@ -102,8 +96,10 @@ public class JagornetDhcpServer public static String JAGORNET_DHCP_SERVER = "Jagornet DHCP Server"; /** The default config filename. */ - public static String DEFAULT_CONFIG_FILENAME = DhcpConstants.JAGORNET_DHCP_HOME != null ? - (DhcpConstants.JAGORNET_DHCP_HOME + "/config/dhcpserver.xml") : "config/dhcpserver.xml"; + public static String DEFAULT_CONFIG_FILENAME = + DhcpConstants.JAGORNET_DHCP_HOME != null ? + "file:" + (DhcpConstants.JAGORNET_DHCP_HOME + "/config/dhcpserver.xml") : + "config/dhcpserver.xml"; // this should be relative /** The configuration filename. */ protected String configFilename = DEFAULT_CONFIG_FILENAME; @@ -1118,6 +1114,10 @@ public static DhcpServerConfig getDhcpServerConfig() @SuppressWarnings("unchecked") public static void registerLog4jInJmx() { + /** + * "Log4j 2 has built-in support for JMX..." + * See: https://logging.apache.org/log4j/2.x/manual/jmx.html + * MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); try { // Create and Register the top level Log4J MBean @@ -1145,6 +1145,7 @@ public static void registerLog4jInJmx() catch (Exception ex) { log.error("Failure registering Log4J in JMX: " + ex); } + */ } public List getV6McastNetIfs() { diff --git a/Jagornet-DHCP/dhcp-server/src/main/java/com/jagornet/dhcp/server/config/DhcpServerConfiguration.java b/Jagornet-DHCP/dhcp-server/src/main/java/com/jagornet/dhcp/server/config/DhcpServerConfiguration.java index 8d577ec4..74d7aa1b 100644 --- a/Jagornet-DHCP/dhcp-server/src/main/java/com/jagornet/dhcp/server/config/DhcpServerConfiguration.java +++ b/Jagornet-DHCP/dhcp-server/src/main/java/com/jagornet/dhcp/server/config/DhcpServerConfiguration.java @@ -25,8 +25,6 @@ */ package com.jagornet.dhcp.server.config; -import java.io.File; -import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; @@ -52,7 +50,6 @@ import org.springframework.core.io.DefaultResourceLoader; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; -import org.springframework.util.ResourceUtils; import com.jagornet.dhcp.core.message.DhcpMessage; import com.jagornet.dhcp.core.message.DhcpV4Message; @@ -198,8 +195,19 @@ public void init(String configFilename) throws DhcpServerConfigException, JAXBEx DhcpServerConfig xmlServerConfig = loadConfig(configFilename); if (xmlServerConfig != null) { boolean needWrite = false; + + V4ServerIdOption v4ServerId = xmlServerConfig.getV4ServerIdOption(); + if ((v4ServerId == null) || + (v4ServerId.getIpAddress() == null)) { + v4ServerId = generateV4ServerId(); + xmlServerConfig.setV4ServerIdOption(v4ServerId); + needWrite = true; + } + dhcpV4ServerIdOption = new DhcpV4ServerIdOption(v4ServerId.getIpAddress()); + V6ServerIdOption v6ServerId = xmlServerConfig.getV6ServerIdOption(); - if (v6ServerId == null) { + if ((v6ServerId == null) || + (v6ServerId.getOpaqueData() == null)) { v6ServerId = generateV6ServerId(); xmlServerConfig.setV6ServerIdOption(v6ServerId); needWrite = true; @@ -208,14 +216,6 @@ public void init(String configFilename) throws DhcpServerConfigException, JAXBEx OpaqueDataUtil.toBaseOpaqueData(v6ServerId.getOpaqueData()); dhcpV6ServerIdOption = new DhcpV6ServerIdOption(baseOpaqueData); - V4ServerIdOption v4ServerId = xmlServerConfig.getV4ServerIdOption(); - if (v4ServerId == null) { - v4ServerId = generateV4ServerId(); - xmlServerConfig.setV4ServerIdOption(v4ServerId); - needWrite = true; - } - dhcpV4ServerIdOption = new DhcpV4ServerIdOption(v4ServerId.getIpAddress()); - globalPolicies = xmlServerConfig.getPolicies(); globalV6MsgConfigOptions = new DhcpV6ConfigOptions(xmlServerConfig.getV6MsgConfigOptions()); globalV6IaNaConfigOptions = new DhcpV6ConfigOptions(xmlServerConfig.getV6IaNaConfigOptions()); @@ -974,7 +974,9 @@ public static void saveConfig(DhcpServerConfig config, String filename) throws I FileOutputStream fos = null; try { log.info("Saving server configuration file: " + filename); - fos = new FileOutputStream(filename); + ResourceLoader resourceLoader = new DefaultResourceLoader(); + Resource resource = resourceLoader.getResource(filename); + fos = new FileOutputStream(resource.getFile()); JAXBContext jc = JAXBContext.newInstance(DhcpServerConfig.class); Marshaller marshaller = jc.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); diff --git a/Jagornet-DHCP/dhcp-server/src/main/java/com/jagornet/dhcp/server/netty/NettyDhcpServer.java b/Jagornet-DHCP/dhcp-server/src/main/java/com/jagornet/dhcp/server/netty/NettyDhcpServer.java index 191941da..904c4f83 100644 --- a/Jagornet-DHCP/dhcp-server/src/main/java/com/jagornet/dhcp/server/netty/NettyDhcpServer.java +++ b/Jagornet-DHCP/dhcp-server/src/main/java/com/jagornet/dhcp/server/netty/NettyDhcpServer.java @@ -71,7 +71,7 @@ import io.netty.util.concurrent.DefaultEventExecutorGroup; import io.netty.util.concurrent.EventExecutorGroup; import io.netty.util.internal.logging.InternalLoggerFactory; -import io.netty.util.internal.logging.Log4JLoggerFactory; +import io.netty.util.internal.logging.Log4J2LoggerFactory; /** * This is a JBoss Netty based DHCPv6 server that uses @@ -140,7 +140,7 @@ public NettyDhcpServer(List v4Addrs, NetworkInterface v4NetIf, int public void start() throws Exception { try { - InternalLoggerFactory.setDefaultFactory(Log4JLoggerFactory.INSTANCE); + InternalLoggerFactory.setDefaultFactory(Log4J2LoggerFactory.INSTANCE); final boolean ignoreSelfPackets = DhcpServerPolicies.globalPolicyAsBoolean(Property.DHCP_IGNORE_SELF_PACKETS); diff --git a/Jagornet-DHCP/dhcp-server/src/main/resources/dhcpserver.xsd b/Jagornet-DHCP/dhcp-server/src/main/resources/dhcpserver.xsd index 9cb66d16..78a2bb4d 100644 --- a/Jagornet-DHCP/dhcp-server/src/main/resources/dhcpserver.xsd +++ b/Jagornet-DHCP/dhcp-server/src/main/resources/dhcpserver.xsd @@ -10,12 +10,15 @@ - + + + + @@ -34,9 +37,6 @@ - - - @@ -67,6 +67,32 @@ + + + + The configuration options are options that have registered codes with + IANA and are defined by RFC's. This list includes only those options + that can be configured for the DHCPv4 server to provide to clients. + Other options, that is options sent from the client to the server, + are defined below for use in forming client filter expressions. + + + + + + + + + + + + + + + + + + @@ -103,32 +129,6 @@ - - - - The configuration options are options that have registered codes with - IANA and are defined by RFC's. This list includes only those options - that can be configured for the DHCPv4 server to provide to clients. - Other options, that is options sent from the client to the server, - are defined below for use in forming client filter expressions. - - - - - - - - - - - - - - - - - - @@ -151,6 +151,9 @@ + + + @@ -169,9 +172,6 @@ - - - @@ -192,10 +192,10 @@ + - @@ -235,12 +235,19 @@ - + + + + + + + + @@ -270,19 +277,42 @@ - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -354,36 +384,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -493,9 +493,9 @@ + - @@ -617,6 +617,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1005,177 +1176,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + %d [%t] %-5p %c{2} - %m%n + + + + + + + + + + + + + + + + + diff --git a/Jagornet-DHCP/dhcp-server/src/test/resources/log4j2-restclient.xml b/Jagornet-DHCP/dhcp-server/src/test/resources/log4j2-restclient.xml new file mode 100644 index 00000000..82f29d85 --- /dev/null +++ b/Jagornet-DHCP/dhcp-server/src/test/resources/log4j2-restclient.xml @@ -0,0 +1,29 @@ + + + + + + + + + + %d [%t] %-5p %c{2} - %m%n + + + + + + + + + + + + + + + + + diff --git a/Jagornet-DHCP/dhcp-server/src/test/resources/log4j2-server.xml b/Jagornet-DHCP/dhcp-server/src/test/resources/log4j2-server.xml new file mode 100644 index 00000000..ac9d8f0e --- /dev/null +++ b/Jagornet-DHCP/dhcp-server/src/test/resources/log4j2-server.xml @@ -0,0 +1,29 @@ + + + + + + + + + + %d [%t] %-5p %c{2} - %m%n + + + + + + + + + + + + + + + + + diff --git a/Jagornet-DHCP/dhcp-server/src/test/resources/log4j2.xml b/Jagornet-DHCP/dhcp-server/src/test/resources/log4j2.xml new file mode 100644 index 00000000..e27db023 --- /dev/null +++ b/Jagornet-DHCP/dhcp-server/src/test/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + %d [%t] %-5p %c{2} - %m%n + + + + + + + + + + + + + + + + + diff --git a/Jagornet-DHCP/pom.xml b/Jagornet-DHCP/pom.xml index df9e52c9..46d88cae 100644 --- a/Jagornet-DHCP/pom.xml +++ b/Jagornet-DHCP/pom.xml @@ -9,7 +9,7 @@ com.jagornet jagornet-dhcp-all - 3.0.0 + 3.0.1 pom jagornet-dhcp-all @@ -19,7 +19,7 @@ 1.8 UTF-8 1.7.23 - 1.2.17 + 2.13.3 4.12 @@ -35,14 +35,22 @@ slf4j-api ${slf4j.version} + - org.slf4j - slf4j-log4j12 - ${slf4j.version} + org.apache.logging.log4j + log4j-core + ${log4j.version} + + + + org.apache.logging.log4j + log4j-api + ${log4j.version} + - log4j - log4j + org.apache.logging.log4j + log4j-slf4j-impl ${log4j.version}