News for hackers. Stuff that matters.
Re:Discussion: structured, leveled logging by jiggawatts on Sunday September 11, 2022 @08:37PM (#32804578)
Not necessarily, this is an implementation detail.

Azure Application Insights for example streams events to a log file asynchronously. A crash is typically captured as a memory snapshot crash dump anyway, so if the entire process terminates then you have something that's probably superior to a text log!

If you open the crash dump, you can inspect the in-memory buffer of log events directly in a debugger.

If the operation fails internally with an exception, then the logs are captured as normal including the exception details.

Asynchronous logging is dramatically more efficient. Or to put it another way, synchronous logging often causes performance bottlenecks that surprises developers.

If you do want "live" logs equivalent to viewing the tail of a text file, most systems (such as App Insights mentioned above) can dynamically switch from async to sync mode and stream all events second-by-second.

There are no comments on this comment yet.