provideLogger<R> function
Provides a logger
to the code inside body
.
Implementation
Future<R> provideLogger<R>(ILogger logger, Future<R> Function() body) async {
var result = await runZoned<Future<R>>(body,
zoneValues: {_pubnubLoggerModuleKey: logger});
return result;
}