Logging is the process of writing what is happening inside a program, during its execution.

For example suppose you run an API. You will log any and every request coming in, into a log file. You will store the current time, IP address, the request data, everything that might help you fix issues or figure out for example the requests frequency, how many requests are coming from client X, how many request want a particular endpoint, and so on.

The log file is nothing more than a text file, well organized.

There are tools that help you do that, of course, and which help you to parse the log file, too.

Logging is also usually done for errors. Different programing environments handle this differently, of course.

Services exist to log anything into a web service rather than your own log files. Storing logs can be expensive, and complicated. They focus on this specific problem point, so you don’t have to worry about it. But of course you have to pay for it.


Go to the next lesson