我打算在Grails中使用审计日志印刷版,只想知道基本的东西。
我们必须创建审计域类,并在手动域中的各种事件上持续到此表中的数据右侧?
我的意思是插件没有创建域名并坚持我肯定的......但是将是保存审计数据的标准方法吗? 还有
如果我想要审核日志中的条目,如

“用户SAM从”IP“登录”时间戳“并更新用户乔治”

我需要在域的"onLoad"事件中处理它?

还如何跟踪像这样的简单事件

“用户RITA登录”时间戳“”

感谢

有帮助吗?

解决方案

The audit logging plugin is much more automated than it appears you think. The plugin does indeed have its own domain class and does save all the audit information for you, without you having to do anything other than adding 'auditable=true' to your domain class that you want audited!

As to the second part of your question, if sam updated george, the update to the fields on 'george' would be audited (assuming you added auditable=true to the domain class that george is), and the fact that sam did it would be captured by the 'actor' information depending on what security framework you're using (this is documented in the plugin).

Your desire to log timestamp and IP upon login may fall outside the audit logging plugin, unless there is a specific change to a domain class that you can capture when someone logs in.

其他提示

The 0.5+ version, 13 October 2010, includes the ability to specify an actorClosure in Config.groovy. The documentation at the link below has examples of how to get user information using several different security plugins.

http://grails.org/plugin/audit-logging

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top