如何不在php 控制台 调试信息,显示这些DEBUG信息

如何关闭springmvc中的控制台Debug和INFO信息_百度知道运行jsp页面,在action设置断点,控制台一下子输出所有提示信息,怎么没有在断点处停留?_百度知道问题:如何不在控制台,显示这些DEBUG信息
描述: 我的Struts项目,在控制台打印了很多信息。我想把它关掉
16:38:17.697::INFO:
Logging to STDERR via org.mortbay.log.StdErrLog
[INFO] Context path = /
[INFO] Tmp directory =
determined at runtime
[INFO] Web defaults = D:\java\project\finance\webdefault.xml
[INFO] Web overrides =
[INFO] Webapp directory = D:\java\project\finance\src\main\webapp
16:38:17.768::INFO:
jetty-6.1.10
[INFO] Starting jetty 6.1.10 ...
16:26:19.018::INFO:
No Transaction manager found - if your webapp requires one, please configure one.
16:26:20.320:/:INFO:
Initializing Spring root WebApplicationContext
16:26:20.283 [main] INFO
o.s.web.context.ContextLoader - Root WebApplicationContext: initialization started
16:26:20.316 [main] INFO
o.s.w.c.s.XmlWebApplicationContext - Refreshing org.springframework.web.context.support.XmlWebApplicationContext@1bf9b45: display name [Root WebApplicationContext]; startup date [Wed May 08 16:26:20 CST 2013]; root of context hierarchy
16:26:20.348 [main] DEBUG o.s.c.i.s.PathMatchingResourcePatternResolver - Looking for matching resources in directory tree [D:\java\project\finance\target\classes]
16:26:20.348 [main] DEBUG o.s.c.i.s.PathMatchingResourcePatternResolver - Searching directory [D:\java\project\finance\target\classes] for files matching pattern [D:/java/project/finance/target/classes/applicationContext-*.xml]
16:26:20.349 [main] DEBUG o.s.c.i.s.PathMatchingResourcePatternResolver - Resolved location pattern [classpath:applicationContext-*.xml] to resources [file [D:\java\project\finance\target\classes\applicationContext-base.xml], file [D:\java\project\finance\target\classes\applicationContext-bean.xml]]
16:26:20.349 [main] INFO
o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [D:\java\project\finance\target\classes\applicationContext-base.xml]
16:26:20.352 [main] DEBUG o.s.b.f.xml.DefaultDocumentLoader - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
16:26:20.378 [main] DEBUG o.s.b.f.xml.PluggableSchemaResolver - Loading schema mappings from [META-INF/spring.schemas]
16:26:20.379 [main] DEBUG o.s.b.f.xml.PluggableSchemaResolver - Loaded schema mappings: {http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/jms/spring-jms-2.5.xsd=org/springframework/jms/config/spring-jms-2.5.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/jms/spring-jms.xsd=org/springframework/jms/config/spring-jms-2.5.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang-
16:38:32.348 [btpool0-3] DEBUG o.s.jdbc.core.JdbcTemplate - Executing SQL query [SELECT u.email,u.userId,u.inport,((select count(*) from user_pay_plan_h ta where ta.userId=u.userId and orderId&&0 and createDate & ' 16:17:11')+(select count(*) from user_pay_apple_h tb where tb.userId=u.userId and purchase_date & ' 16:17:11')+(select count(*) FROM coupon c left join reward r on c.rewardId=r.id left join coupon_give g on c.keyNo=g.keyNo where g.useUserId=u.userId and c.cardNo like 'P%' and c.useTime & ' 16:17:11')+(select count(*) FROM coupon c left join reward r on c.rewardId=r.id left join coupon_edit_history h on c.editId=h.id where c.userId=u.userId and c.useTime & ' 16:17:11' and c.type=1 and c.cardNo not like '99%' and c.cardNo not like 'Z%' and c.cardNo not like 'F%' and c.cardNo not like 'P%' and h.money&0)+1) as count from user u where u.userId =338841]
16:38:32.348 [btpool0-3] DEBUG o.s.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource 我在WEB.XML里面配置了log4j的信息 &context-param&
&param-name&log4jConfigLocation&/param-name&
&param-value&/WEB-INF/log4j.properties&/param-value&
&/context-param&
&!-- 每隔60秒检测一下Lo4j配置文件 --&
&context-param&
&param-name&log4jRefreshInterval&/param-name&
&param-value&60000&/param-value&
&/context-param& 也在WEB-INF下面,添加了log4j.properties文件
文件内容如下 log4j.rootLogger = WARN, D, E
.opensymphony.xwork2= WARN
log4j.logger.java.sql.C
log4j.logger.java.sql.Statement=DEBUG
log4j.logger.java.sql.PreparedStatement=DEBUG
log4j.logger.java.sql.ResultSet=DEBUG
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.C %p [%c] - %m%n
log4j.appender.logfile=org.apache.log4j.RollingFileAppender
log4j.appender.logfile.File=d:/itSupport.log
log4j.appender.logfile.MaxFileSize=512KB
# Keep three backup files.
log4j.appender.logfile.MaxBackupIndex=3
# Pattern to output: date priority [category] - message
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.C %p [%c] - %m%n 请问,我的设置有什么问题,我如何才能不显示这些垃圾信息 解决方案1: LZ好好研究下log4j吧;还有你的web服务器跟hibernate、spring(如果用到了)也会有日志输出;单纯从你个人建的日志配置文件配置一些东西是无法完全控制你的控制台输出信息的 解决方案2:把
log4j.properties中DEBUG都改成WARN甚至更高级别
以上介绍了“如何不在控制台,显示这些DEBUG信息”的问题解答,希望对有需要的网友有所帮助。
本文网址链接:/itwd/1222926.html
上一篇: 下一篇:17434人阅读
Some Tips(15)
当你在Eclipse中 running/debugging一个应用程序的时候,有关该应用程序的运行调试信息及日志信息都会输出到控制台(console )显示,但是Eclipse只会显示最后一部分的日志信息,如果你的应用程序会产生大量的运行调试信息及日志信息,你可能会想保持这些信息到文件中,以便查看分析。
有三种方法仅供参考:
(1)、我们可以设置Eclipse保存控制台文件。打开Run -& Run Configuration 或者 Debug Configurations菜单。 设置“Standard Input and Output”, 勾选 “File:”, 填写输出文件路径及文件名。如果你勾选了“Append”,输出的日志将会被追加写入到文件最后,否则将会覆盖重写文件。
(2)、第二种途径是程序中手动控制输出到文件中:
System.setOut(new PrintStream(new FileOutputStream(“output.txt”)));
System.out.println(“This is test output”);
(3)、当然我们还可以让eclipse的控制台不限日志输出的行数:
以上就是可以使用的几种方法。
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:410824次
积分:7954
积分:7954
排名:第1739名
原创:445篇
转载:53篇
评论:87条
(3)(1)(4)(6)(5)(5)(14)(2)(53)(28)(28)(8)(35)(23)(48)(71)(9)(10)(20)(6)(5)(5)(17)(32)(7)(5)(15)(8)(6)(1)(3)(2)(1)(2)(1)(1)(9)}

我要回帖

更多关于 php 控制台 调试信息 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信