记录用户交互:log4j? [英] record the user interaction: log4j?

查看:96
本文介绍了记录用户交互:log4j?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要你的建议。
我有一个Java应用程序,我想记录用户使用我的应用程序的方式。
我想知道最常用的按钮是什么。
计算应用程序中新患者的平均引入时间。
等等。
在您看来,最好和最简单的方法是什么?是否使用Log4j?

I need your suggestions. I have a Java application and i would like to record the way that the users use my application. I wonder what the most frequently used buttons are. Calculate the average length of introduction of a new patient in the application. Etc. In your opinion what is the best and simpler way to do that? Is it using Log4j?

感谢您的合作。

祝您好运。

Daniel

推荐答案

我已经考虑过为我的应用程序做类似的事情,然后放入至少一些高级用户事件的记录(打开文件,保存,新等),这样只给出一个日志文件就可以告诉用户正在做什么。

I have had in mind doing something similar for my application, and putting in at least some logging of high-level user events (open file, save, new, etc.) so that given only a log file it might be possible to tell what the user was doing.

这是一个很好的例子:

NetBeans平台手势集合基础结构

Here is a good example to look at:
NetBeans Platform Gesture Collection Infrastructure.

这应该可以为您提供有关如何执行操作的一些想法。如果您有一个Java Swing应用程序,它可能可以移植到NetBeans平台,然后您可以免费获得此更多。 免责声明:我是NetBeans平台上令人满意的开发人员。

This should give you some ideas of how to do what you want to do. If you have a Java Swing app, it can probably be ported to the NetBeans Platform and then you get this and more for free. Disclaimer: I am a satisfied developer on NetBeans Platform.

尽管NetBeans称之为手势集合,但它并没有出现在其他任何人身上是,或者说有一个通用术语; 用户行动分析会很好,但几乎任何带有分析的东西现在指向谷歌。许多程序说匿名使用数据,并且发现我这个类似的问题,可以帮助某人使用Eclipse。

Although NetBeans is calling this 'Gesture Collection', it doesn't appear anyone else is, or that there is a generic term for this; "user action analytics" would be nice, but nearly anything with "analytics" now points to google. A lot of programs say "anonymous usage data" and that found me this similar question, which may help someone use Eclipse.

对于一个webapp,你应该可以从网上收集大部分内容访问日志,可能会向请求添加一些额外的信息(例如'& userButton = SaveAs'),甚至添加一些额外的Ajax-y事件来跟踪用户(小心不要产生太多的额外流量:仅为某些用户启用;使用零字节文件(例如
GET /zerobytes.txt?t=1313518123&event=hover&element=menuNav&duration=12 )最小化服务器响应。使用jquery可能会更容易,并且可能不会对HTML进行任何更改。

For a webapp, you should be able to gather much of this from the web access logs, possibly adding some additional info to the requests (e.g. '&userButton=SaveAs') or even adding some additional Ajax-y events to track the user (be careful to not generate too much additional traffic: only enable for some users; minimize server response with a zero-byte file like GET /zerobytes.txt?t=1313518123&event=hover&element=menuNav&duration=12). This should be pretty easier to do with jquery and likely no changes to your HTML.

在服务器端,可能有更丰富的工具可供选择,支持这一点的技术数量(JMX,MBeans,JSR-77等)。如果您正在谈论网络应用, JavaMelody 可能包含一些特定于应用程序的自定义事件方法,特别是如果你可以将它们绑定到启动某种类型的服务器端处理。

On the server side, there is probably a richer set of tools to choose from and a number of technologies that support this (JMX, MBeans, JSR-77,etc). If you are talking about a webapp, JavaMelody with some application-specific custom events might be the way to go, especially if you could tie them to initiating some type of server-side processing.

这篇关于记录用户交互:log4j?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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