我建立了一个demo项目,目录结构如下:类的代码: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()); }} 运行总是报错:ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.是哪里还需要配置吗? 跪求解答..
添加回答
举报
0/150
提交
取消