dvLogXRDiagnostic function
Logs code at the level the diagnostic registry assigns it.
Implementation
void dvLogXRDiagnostic(String code, String message, Map<String, Object?> context) {
final String level = DVDiagnostics.find(code)?.level ?? 'warning';
DVObservability.log(
'$code: $message',
level: switch (level) {
'debug' => DVLogLevel.debug,
'info' => DVLogLevel.info,
'error' => DVLogLevel.error,
_ => DVLogLevel.warn,
},
code: code,
context: context,
);
}