質問

私はGrailsで監査ロギングプラグインを使用し、ただ基本的なものを知りたいと思っています。
ドメインクラスからのさまざまなイベントで監査ドメインクラスを作成し、データを埋め込む必要があります。
プラグインがドメインを作成しないことを意味し、私は確信しています。これは監査データを保存する標準的な方法です。
auditログのようなエントリがのような場合

"ユーザーSAM" IP "で" IP "から" IP "からログインし、更新されたユーザーGeorge"

ドメイン右側の"onLoad"イベントで処理する必要がありますか?

また、のような単純なイベントを追跡するのでしょうか

"" Timestamp "でログインしたユーザーリタ

ありがとう

役に立ちましたか?

解決

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