Overview
For errors you catch in a try/catch block, useErrorLogger.log() to send them to Zentien instantly via Platform Events. There is no email delay — errors appear in your dashboard in real time.
Basic usage
Method signatures
Severity levels
| Level | When to use |
|---|---|
INFO | Non-critical issues, handled gracefully |
WARNING | Unexpected but recoverable |
ERROR | Standard errors that need attention (default) |
CRITICAL | Severe failures affecting core functionality |
Examples
Basic exception logging:Important notes
ErrorLoggeris designed to never throw. If publishing the Platform Event fails for any reason, the error is silently swallowed — your calling code is never affected.- All logging is done asynchronously via Platform Events. There is no performance impact on the transaction that calls it.
- If you catch an exception and also re-throw it, call
ErrorLogger.log()before re-throwing.