This class allows us to isolate all our logging dependencies in one place. It also allows us to have zero runtime 3rd party logging jar dependencies, since we default to JUL by default.
By default logging will occur using JUL (Java-Util-Logging). The logging configuration file (logging.properties) used by JUL will taken from the default logging.properties in the JDK installation if no {@code java.util.logging.config.file} systemproperty is set. The {@code vertx-java / vertx-ruby / etc} scripts set {@code java.util.logging.config.file} to point at the logging.propertiesin the vertx distro install directory. This in turn configures vertx to log to a file in a directory called vertx-logs in the users home directory.
If you would prefer to use Log4J or SLF4J instead of JUL then you can set a system property called {@code io.vertx.logger-delegate-factory-class-name} to the class name of the delegate for your logging system.For Log4J the value is {@code io.vertx.core.logging.impl.Log4JLogDelegateFactory}, for SLF4J the value is {@code io.vertx.core.logging.impl.SLF4JLogDelegateFactory}. You will need to ensure whatever jar files required by your favourite log framework are on your classpath.
@author Tim Fox
|
|