3 ms·
The deal with good logging is that good structured code makes debugging with logging easier. The unsaid rule - If you're into async and suddenly printing a bun
by vkaku 8y ago
The deal with good logging is that good structured code makes debugging with logging easier.
The unsaid rule - If you're into async and suddenly printing a bunch of messages, logging will not help you. :)
- marcosdumay 8y agoLog synchronously. Either exploit the POSIX propensity of buffering lines, have an explicit synchronization on your IO routine (that doesn't need to stop the business code), or log each thread to a different stream.
- sethammons 8y agoWhy would logging not help in an async flow? Link log entries with request IDs and consider structured logs. I analyze logs in massively concurrent systems all the time.