$on method
The $on() method allows you to subscribe to events.
All message use a Exception class wrapper.
Example:
prisma.$on({PrismaLogLevel.query}, (e) {
if (e is PrismaQueryEvent) {
print(e.query);
}
});
Implementation
void $on(Iterable<PrismaLogLevel> levels, PrismaLogHandler handler) =>
$engine.logEmitter.on(levels.toSet(), handler);