dvLogProtocolDiagnostic function
The default diagnostic sink: the log, at the level the registry assigns.
Implementation
void dvLogProtocolDiagnostic(String code, String message) {
final String level = DVDiagnostics.find(code)?.level ?? 'warning';
_protocolLogger.log(
'$code: $message',
level: switch (level) {
'debug' => DVLogLevel.debug,
'info' => DVLogLevel.info,
'error' => DVLogLevel.error,
_ => DVLogLevel.warn,
},
);
}