Logger

Document management

Description

Sets or retrieves the structured internal logger attached to this TPDFlib instance. When set, the logger receives Debug/Info/Warn/Error records carrying a numeric code (reusing the existing FLastErrorCode taxonomy) and a human-readable message.

The logger (TPDFlibLogger from the PDFlibLogger unit) supports a host callback (OnLog) and an optional thread-safe file sink (FileName). Set the Level property to filter: records below the threshold are silently dropped. The logger is nil by default, so the no-logger path is zero-cost.

PDFlibErrorMessage(Code) translates a numeric code into a human message and can be called independently of the logger.

Syntax

Delphi

Property Logger: TPDFlibLogger;

Parameters

LoggerA TPDFlibLogger instance (caller-owned). Set to nil to disable logging