在运行时跟踪java应用程序 [英] Trace java application at runtime

查看:107
本文介绍了在运行时跟踪java应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在运行时跟踪一个java应用程序来记录并分析其每个行为。

I'd like to trace a java application at runtime to log and later analyze every its behaviour.

有没有可能挂钩到一个java应用程序来获取运行时信息,如方法调用(具有参数和返回值)和对象的状态(即其属性及其值)?

Is there a possibility to hook into a java application to get runtime information like method calls (with parameters and return values) and the status of an object (i.e. its attributes and whose values)?

我的目标是获得完整的了解的应用程序行为以及如何处理数据。

My goal is to get a complete understanding of the applications behaviour and how it deals with the data.

推荐答案

如果您需要高度自定义的日志记录和运行时处理,剖析器将使用方面加载时编织

If you need highly customized logging and runtime processing, one alternative to profilers is to use aspects and load-time weaving.

我们使用AspectJ这种方式来捕获并记录用于调用多个低级方法进行调试的用户的认证信息,以及t o撤消错误更改。

We use AspectJ in this way to capture and log the authentication information for users who call a number of low-level methods for debugging purposes and to undo mistaken changes.

这篇关于在运行时跟踪java应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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