Logs are defined as records of incidents or observations. Logs are generated by a wide variety of resources, such as systems, applications, devices, humans, and so on. A log is typically made of two things; that is, a timestamp (the time the event was generated) and data (the information related to the event):
Log = Timestamp + Data
Logs are typically used for the following reasons:
- Troubleshooting: When a bug or issue is reported, the first place to look for what might have caused the issue is the logs. For example, when looking at an exception stack trace in the logs, you may easily find the root cause of the issue.
- To understand system/application behavior: When an application/system is running, it's like a black box, and, in order to investigate or understand what's happening within the system/application, you have to rely on logs. For example...