ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2
有时写了日志配置,而且指定了配置文件位置,但仍报配置文件文件未找到。应该是在指定配置文件的代码执行前就执行了读取配置文件的代码。
比如下面的代码底层就执行了读取配置文件的代码,但在此之后在指定配置文件位置就迟了:
Vertx vertx = Vertx.vertx();