Class InitLogger
Inheritance
Namespace: IronWord.Models.Initiate
Assembly: IronWord.dll
Syntax
public class InitLogger : Object
When a Word build needs a written record of what IronWord is doing, InitLogger starts logging to a file. Construct one with new InitLogger(logPath), passing the path where the log should be written, and the library records its activity there as a document is assembled. The captured trace is a debugging aid: it shows how the object tree is built so a developer can spot a misplaced element, a missing run, or an inefficiency in the construction sequence.
The single argument, logPath, is the destination file for the output, so point it at a writable location and inspect that file after a run. Set the logger up early, before the document work begins, so the whole sequence is captured rather than a partial tail. The log object tree example shows the logged structure during document construction, and the document element tutorial explains the elements that appear in that trace.
var logger = new InitLogger("ironword.log");Constructors
InitLogger(String)
Declaration
public InitLogger(string logPath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | logPath |