审计和日志记录的区别?

发布于 2024-08-26 06:24:44 字数 64 浏览 5 评论 0原文

我经常遇到这两个词,但我没有发现它们有多大区别?我的意思是想知道它们可以互换使用还是两者之间存在一些差异? 谢谢。

I have been coming across these two words more often but i didn't see much difference in these? I mean want to know are they used interchangeably or there are some differences in those two?
Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

回眸一遍 2024-09-02 06:24:45

日志记录通常意味着记录程序运行时发生的实现级别事件(调用方法、创建对象等)。因此,它关注程序员感兴趣的事情。

审计是关于记录域级事件:创建交易、用户正在执行操作等。在某些类型的应用程序(银行业)中,有记录此类事件的法律义务。

Logging typically means the recording of implementation level events that happen as the program is running (methods get called, objects are created, etc.). As such it focuses on things that interest programmers

Auditing is about recording domain-level events: a transaction is created, a user is performing an action, etc. In certain types of application (Banking) there is a legal obligation to record such events.

对风讲故事 2024-09-02 06:24:45

差异更多在于使用而不是技术。

审计用于回答“谁做了什么?”的问题。以及可能的原因。日志记录更关注正在发生的事情。

The difference is more in usage than in technique.

Auditing is used to answer the question "Who did what?" and possibly why. Logging is more focussed on what's happening.

夏末的微笑 2024-09-02 06:24:45

审计通常有法律要求,这是一个技术问题。此外,审核通常是在应用程序内完成的,例如:有一个用户界面可以查看谁更改了哪些内容,因为用户/合规部门可能需要检查它。此外,审计可能有法律要求(一次写入 WORM 介质,使其无法被操纵,将数据保留 x 年)。

一个例子:我有一个交易应用程序。对订单的所有更改都会经过审核 - 您拥有 OrderStatus 和 OrderStatusHistory。这不是技术性的 - 历史记录是应用程序界面的一部分。

日志记录纯粹是技术性的。有时将其关闭或让管理员提取日志文件是完全可以的。

There is a technical issue in that Auditing often has legal requirements. Also, Auditing is often done within the application, as in: there is a user interface to see who changed what because users / compliance department may need to check it. Also, Auditing may have legal requirements (write out to WORM media once so it cannot be manipulated, keep data for x years).

An example: I have a trading application. All changes to orders are audited - you have the OrderStatus, and the OrderStatusHistory. This is not technical - and the history is part of the application interface.

Logging is purely technical. It is totally ok to turn it off at times, or to have admins extract the log files.

一刻暧昧 2024-09-02 06:24:45

它们有显着的不同。日志记录只是记录系统中发生的事件数据的抽象任务。如果您记录任何信息,那么您就是在记录。

然而,审计更为复杂。审核是检查日志的做法,目的是验证系统是否处于理想状态或回答有关系统如何达到特定状态的问题。当然,进行审核的一种方法是检查日志,但是您可以在没有日志的情况下进行审核(作为一个简单的示例,您可以直接询问用户他们是否对特定更改负责)。这不是一个好主意,因为日志记录通常是一种成本低廉的操作,不需要考虑替代方案。

They're significantly different. Logging is simply the abstract task of recording data about events that take place in a system. If you are recording any information at all, you're logging.

Auditing, however, is more complex. Auditing is the practice of inspecting logs for the purpose of verifying that the system is in a desirable state or to answer questions about how the system arrived at a particular state. One way of doing auditing is by reviewing logs, of course, but you can do audits without logs (as a simple example, you could ask a user directly whether they were responsible for a particular change). That's not a great idea, because logging is typically such a cheap operation that alternatives don't need to be considered.

掩于岁月 2024-09-02 06:24:45

我将审核日志视为业务所需的信息,以确定该用户在特定日期和时间对该用户发生的某些操作。它具有附加的商业价值,可以让您验证发生了什么。一般来说,审核日志的存档是出于历史和合规性目的。

另一方面,普通日志记录技术合作伙伴所需的信息,以了解发生的情况或系统在特定事件期间的行为方式。它可以包含方法签名、哪些值作为输入传递、哪些值作为输出传递、以及是否存在异常、有关异常的更多信息等。业务不需要这些信息,可以关闭或可以根据需要减少记录的详细信息。这些信息基本上可以帮助开发或支持团队调试系统。

I see Audit logs as information required by Business to ascertain some action happened on the specific date and time by this user for this user. It has a business value attached to it, which will let you verify what happened. Generally, Audit logs are archived for historical and compliance purpose.

Normal logging, on the other hand, logs information required by technology partner to understand what happened or how the system behaved during a specific event. It can contain method signature, what values are passed as input, and what values are as passed as output, and if there was an exception, more information about the exception etc. These information are not required by the business and can be turned off or the details which are logged can be reduced based on the needs. These information basically assist development or support teams to debug the system.

养猫人 2024-09-02 06:24:45

审计

  • 业务级事件
  • 用户和客户的信息
  • 谁在何时做了什么 通常
  • 法律或客户合同要求
  • 通常无限期保存或至少在法律规定的期限内保存

示例:

2021-01-01T08:45:21 用户 4711 访问了记录 0815
2021-02-02T12:13:45 收到新发票,guid 为 f456-87D2-...

记录

  • 新发票程序级事件
  • 为开发人员和支持提供的信息
  • 发生了什么,包括调试信息
  • 维护或调试目的所需
  • 经常短时间后删除

示例:

2021-01-01T08:45:21 方法 Foo.Bar() 发送 46kb 请求到 https://...
2021-02-02T12:13:45 在服务器 server01.mydomain 上启动 id 4711 的侦听器

Auditing

  • Business level events
  • Information for users and clients
  • Who did what, when
  • Often required legally or by the client contract
  • Usually kept indefinitely or at least for legally specified period

Examples:

2021-01-01T08:45:21 User 4711 accessed record 0815
2021-02-02T12:13:45 Received new invoice with guid f456-87D2-...

Logging

  • Program level events
  • Information for developers and support
  • What happend, incl debug informations
  • Required for maintenance or debugging purposes
  • Often deleted after a short time

Examples:

2021-01-01T08:45:21 Method Foo.Bar() sending request of 46kb to https://...
2021-02-02T12:13:45 Starting listener with id 4711 on server server01.mydomain

熟人话多 2024-09-02 06:24:45

日志记录正在跟踪哪个类中哪个方法被调用的流程让我们有不同类的A、B、C方法在X类中A方法被调用到Y类B方法,并且B方法被调用到 Y 类 c 方法..像这样跟踪控制流

审核将跟踪用户的活动。我们必须编写逻辑,然后系统会自动将数据插入/保存到审计表中。

让我们看一个 login.jsp,我们可以输入用户名和密码,然后点击登录页面,然后控制转到服务方法内的逻辑 servlet 页面,将调用服务方法,并在里面编写逻辑,例如

httpsession session=reg.getsession();
session.setAttribute("userId",uid);

在数据库中我们将列作为

created_by 
created_date
last_modified_by
last_modified_dt

Logging is tracing the flow of in which class which method called let us we have A,B,C methods with deffrent classes In X class A methods is called to Y class B method,and B method is called to Y class c method ..like this traces the flow of control

Auditing will track the activities of user. We have to write logic and then system will automatically insert/save the data int the audit table.

Let's take a login.jsp in that we can enter the user name and password then hit the login page then control goes to logic servlet page inside the service method will called and inside write the logic like

httpsession session=reg.getsession();
session.setAttribute("userId",uid);

i.e in the database we have take columns as

created_by 
created_date
last_modified_by
last_modified_dt
烟柳画桥 2024-09-02 06:24:45

恕我直言,审计意味着对日志记录进行积极的审查。没有日志记录就无法进行审核,但您可以在没有审核的情况下进行日志记录。

Audit implies active review of the logging, IMHO. Can't have audit without logging, but you can have logging without audit.

十年九夏 2024-09-02 06:24:45

审计跟踪是事务的不可磨灭的记录,而日志则用于检测错误,日志文件在一定时间内会存在

Audit Trail is a unperishable records of transaction while Logs in the other hand used to detect errors and there is a certain time that a log file will be present

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文