With for example write to source from a null driver, one doesn't get the
benefit of the publisher optimize-modify stage.

I guess for most people that is what is wanted. However I have a use case
where this is not wanted.

Attempts to replicate optimise-modify in dirxml result in code that has its
own bugs and is slower.

I can just convert to a loopback driver and get this for free, but I want
to know what attributes were actually written and log them in a level 0

Any ideas?

Right now my best suggestion is to use loopback and then a separate driver
that events on changes to these attributes and writes that to a trace file.