审核日志记录策略 [英] Audit Logging Strategies

查看:449
本文介绍了审核日志记录策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试确定应用程序中审核日志记录的最佳方法.该日志的主要原因是报告事件(更改)的顺序.

I am trying to decide on the best method for audit logging within my application. The main reason for the log is reporting the sequence of events (changes).

我有一个对象层次结构,当稍后对该层次结构的任何部分进行更改时,我需要创建报告.

I have a hierarchy of Objects, I need to create reports when something changes on any part of that hierarchy, at a latter date.

我认为我有三个选择:

  1. 每个表都有一个日志,因此与对象的层次结构匹配,然后为报表创建视图.
  2. 展平层次结构并规范化表,使报告更加轻松-简单的select语句.
  3. 只有一个日志表,并且每个更改都有一条记录,这使得报告变得更加困难,但更灵活.

我目前倾向于选项1.

推荐答案

审核日志基本上是按时间顺序排列的已发生事件,执行这些事件的人以及事件的类型.

An audit log is basically a chronological list of events that occurred, who performed these events, and what the events were.

我认为,采用扁平视图会更好,因为可以轻松订购和查询它.所以我更倾向于您的选择2/#3.

I think a flat view would be better as it can be easily ordered and queried. So I'm leaning more towards your option #2/#3.

包括诸如交易类型,时间,用户ID,更改内容的描述以及与您的产品相关的其他相关信息之类的信息.

Include things like the transaction type, the time, the user id, a description of what's changed, and other pertinent information related to your product.

随着时间的推移,您还可以向产品中添加内容,而无需不断修改审核日志模块.

You can also add things to your product over time and you won't need to continually modify your audit log module.

这篇关于审核日志记录策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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