我建立了一個(gè)demo項(xiàng)目,目錄結(jié)構(gòu)如下:類的代碼:package com.asiainfo.firstmaven.helloworld;import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;public class HelloWorld { String sayHello() { return "Hello World"; } public static void main(String[] args) { Logger logger = LogManager.getLogger(HelloWorld.class); logger.debug("I am a debug"); logger.error("I am a error"); logger.warn("I am a warn"); logger.info("I am a info"); System.out.println(new HelloWorld().sayHello()); }} 運(yùn)行總是報(bào)錯(cuò):ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.是哪里還需要配置嗎? 跪求解答..
maven項(xiàng)目讀不到log4j的配置文件
慕尼黑8549860
2019-03-21 10:19:43