convert diagnostics to trace logging