Guarantees
Last updated
Last updated
This page lists the guarantees provided by built-in log implementations (, and ). These guarantees reflect the following design principle: logging system should not be able to affect overall application health and performance.
If log events cannot be saved for any reason (ranging from incorrect to running out of disk space or experiencing remote backend unavailability), log method calls still complete successfully without throwing exceptions. If possible, a diagnostic message is produced via secondary means (console output for and any local log for ).
Log methods always return instantly (and are mostly lock-free). All the necessary I/O (writing to file/console or sending HTTP requests) happens in the background.
Async I/O implies buffering. Log implementations have configurable limits on internal buffer sizes to avoid allocating too much memory. CPU usage is generally bounded to a single core.
Logs delivery is maintained on a best effort basis. Events can be lost in following cases:
Internal buffers overflow due to unavailability of underlying storage or sheer volume of incoming logs.
Application terminates abruptly without flushing/disposing async loggers.
Reporting of events loss (metrics, diagnostic messages) is implementation-specific (see usage tips for , and logs).