onLog method

void onLog(
  1. Job<Object?> job,
  2. Object? message
)

A job called JobContext.log, with what it passed.

message arrives as the body gave it, untouched: making a line out of it is this listener's business, and a toString that throws while it does is a hook that throws — the error goes to the current zone and nothing else changes. A body that wants its message built only when somebody listens passes a closure, and calling it is this listener's convention: one that prints the message as it came prints the closure itself.

Implementation

void onLog(Job<Object?> job, Object? message) {}