Auditing and logging differences
Auditing and logging are two concepts that are, sometimes, used interchangeably in some contexts. However, there are some important differences between the two.
Logging refers to program-level events that happen throughout its execution. Usually, these events are atomic operations that happen internally and contain information that is useful for development, bug identification, and fixing. Logging includes information about what happened in the level of detail that is useful for the developers. Often, logs are deleted after a short- or developer-determined amount of time.
As an example of logging, when we start up the MongoDB server, we can see entries in the logs like the following:
{"t":{"$date":"2022-02-05T13:10:05.951+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"Checkpointer","msg":...