WithLoggerFactory(ILoggerFactory?) Method

Definition

Namespace Broadside
Assembly Broadside.dll

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)

Parameters

loggerFactory
ILoggerFactory?

The logger factory, or null to use the container's or none.

Returns

PdfOptions
These options.

Remarks

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.