onError method

void onError(
  1. Object error,
  2. StackTrace stackTrace
)

Called when write fails or when a log-stream emits an error.

Does nothing by default: a failing sink should not take down the program it is logging for. Override this to report the failure somewhere else.

Implementation

void onError(Object error, StackTrace stackTrace) {}