如何设置intellij以在日志选项卡而不是输出选项卡中显示日志 [英] How to set intellij to show logs in the logs tab and not the output tab

查看:153
本文介绍了如何设置intellij以在日志选项卡而不是输出选项卡中显示日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用intellijs'(12.1.4)内置的tomcat时,日志被写入调试面板的输出选项卡而不是正常的localhost日志选项卡。



我跟着

解决方案

在应用程序服务器的运行/调试配置中,打开日志选项卡,并在那里指定完整的日志文件路径。



您只需在磁盘中搜索 algo_js.log 文件并指定其位置。


When I use intellijs' (12.1.4) built-in tomcat the logs are being written to the output tab of the debug panel and not to a the normal localhost log tab.

I followed this document and added my log4j.properties which works fine in the output tab but it still does write the logs to right tab.

When I pack the project and deploy it on standalone tomcat I can see the logs.

Normally I would not care but the problem with the output tab is that you can not search in it.

This is my log4j and I have tired it both with ConsoleAppender and RollingFileAppender.

log4j.rootLogger=TRACE, A1

log4j.appender.A1=org.apache.log4j.RollingFileAppender
log4j.appender.A1.File=${catalina.home}/logs/algo_js.log
log4j.appender.A1.MaxFileSize=500KB
log4j.appender.A1.MaxBackupIndex=5
log4j.appender.A1.layout=org.apache.log4j.PatternLayout

# Print the date in ISO 8601 format
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

Any ideas what I am missing?

Just clarify I added a pic.

解决方案

In the application server Run/Debug configuration open the Logs tab and specify the full log file path there.

You can just search your disk for algo_js.log file and specify its location.

这篇关于如何设置intellij以在日志选项卡而不是输出选项卡中显示日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆