2 worldcats WorldCats 于 2017.09.15 09:39 提问

在eclipse中运行代码后总是会出现很多的的DEBUG [main请问如何解决,看着很不舒服

DEBUG [main] - Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [main] - Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [main] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
INFO [main] - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@9e725a: startup date [Fri Sep 15 09:36:36 CST 2017]; root of context hierarchy
DEBUG [main] - Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [main] - Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [main] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
INFO [main] - Loading XML bean definitions from class path resource [applicationContext.xml]
tMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@6a205]
DEBUG [main] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@e136d3: defining beans [d,d1,d2]; root of factory hierarchy
DEBUG [main] - Creating shared instance of singleton bean 'd'
DEBUG [main] - Creating instance of bean 'd'
DEBUG [main] - Eagerly caching bean 'd' to allow for resolving potential circular references
DEBUG [main] - Invoking init method 'init' on bean with name 'd'
ce of singleton bean 'd2'
DEBeansView.mbeanDomain' in [syst。。。

3个回答

weisheixiaoxin
weisheixiaoxin   2017.09.15 09:50
已采纳

将log4j文件调级别:优先级从高到低分别是 ERROR、WARN、INFO、DEBUG,现在是DEBUG 调至INFO 只显示INFO以上的。

WorldCats
WorldCats 谢谢,我调至WARN级就没有问题了,非常感谢
2 个月之前 回复
qq_40212465
qq_40212465   2017.09.15 09:59

把log4j改个名字试试,改个名字就无法识别了

qq_23370223
qq_23370223   2017.09.15 09:55

代码中Log打印的较多,不喜欢看debug,你可以屏蔽掉,只看error

Csdn user default icon
上传中...
上传图片
插入图片