idea怎么跳转到源代码_intellij idea console日志输出可点击直接跳转到源代码

论坛 期权论坛 编程之家     
选择匿名的用户   2021-6-2 20:11   2519   0

https://www.jetbrains.com/idea/help/setting-log-options.html

引用

If you are using third-party logging tools, you might want to make the message's output that mimics a standard linkage to the source code as for stacktrace line

(at .(:)). For that, add specific Conversion Pattern to your log.xml configuration file.

For example, in a log4j Conversion Pattern this would be .

如果你用了spring-boot,且日志系统用的是logback, 则你可以这样写的logback.xml文件

注意那上面变量: CONSOLE_LOG_PATTERN 这里的 \\( 是进行转换.

关于logback的那些参数说明, 请参见:

http://logback.qos.ch/manual/layouts.html

http://aub.iteye.com/blog/1103685

在 stackoverflow上也有个相应的问题:

http://stackoverflow.com/questions/7930844/is-it-possible-to-have-clickable-class-names-in-console-output-in-intellij

附个打印出日志的截图:

8b404d60e263ae2f601323f9e98a7a4d.png

分享到:

18e900b8666ce6f233d25ec02f95ee59.png

72dd548719f0ace4d5f9bca64e1d7715.png

2015-11-26 14:47

浏览 8423

评论

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP