Logs every diagnostic through loggerFactory as well as recording it on the document. Without it, an engine
built through dependency injection logs through the container's logger factory and any other engine logs nothing.
public PdfOptions WithLoggerFactory(ILoggerFactory? loggerFactory)
The logger factory, or null to use the container's or none.
Spec #33, user story 45. Diagnostics are logged under the category Broadside.PdfDocument with event id 1,
Diagnostic, at or after their severity, with the structured
values Code, Severity, Offset, ObjectReference and Message. In strict mode the deviation is
logged before it is thrown.