Logs captures information at specific points in the program. Usually this takes the form of messages, warnings or errors.
These are great debugging or ‘murder-mystery’ solving tools where engineer looks at the logged information at certain points. They can also provide as a reconstruction of how something came to be.
One might even be inclined to follow the execution path of requests or executions, but traces are better for that.
A great way to log is using structured logging.