3 ms·
There are lots of systems. Obviously the easiest way is to just write some text to a file. There are some libraries that make logging easier and give you some
by mikekchar 8y ago
There are lots of systems. Obviously the easiest way is to just write some text to a file. There are some libraries that make logging easier and give you some extra facilities (like formatting the time every time you write to the file, etc). There are also some services that allow you to manage logs for a lot of systems. Google has a service called stackdriver. You send messages to stackdriver and then you can go to the stackdriver service to see all the logs for all your systems.
Logging is a big topic and there are as many ways to do it as there are programmers. Some people like to log a lot of stuff (for example, every time you enter and exit a function, some people will write an entry to the log! That way they can see how the program is running. Personally, I hate that :-) ). Some people like to write only error to the log.