ConnectorLib .NET 24.2

# Write Messages to the Log

All of the fetch action methods you can override in `ConnectorBase` are passed a `task` object with a `Log` property of type `ILog`. This allows you to log messages at a variety of levels:

           task.Log.WriteLine(LogLevel.Always,
    		"This message will always be logged");
           task.Log.WriteLine(LogLevel.Critical,
    		"This is logged at the critical level");
           task.Log.WriteLine(LogLevel.Error,
    		"Errors are logged at this level");
           task.Log.WriteLine(LogLevel.Warning,
    		"Warnings are logged at this level");
           task.Log.WriteLine(LogLevel.Normal,
    		"This is the normal level of verbosity for logs");
           task.Log.WriteLine(LogLevel.Full,
    		"Verbose logging");
           task.Log.WriteLine(LogLevel.Debug,
    		"For internal use only - these messages will never appear");

These levels correspond to the levels you can specify for the `LogLevel` parameter in the `[Logging]` section of the connector's configuration file. Messages only appear in the connector's log files if the `LogLevel` parameter is set to the level passed to `WriteLine`, or a more verbose level. For more information about the `LogLevel` parameter, see LogLevel.

## Log Files

The connector writes each log message to one of its log streams. When an administrator deploys a connector, they can choose to write messages from each log stream to a separate file. For example, the administrator might choose to write messages from the synchronize log stream to `synchronize.log`, messages from the collect log stream to `collect.log`, and so on.

The log stream that the connector uses for a specific log message depends on the type of task that logged the message:

Method Overridden | Task Type | Log Stream
--- | --- | ---
Synchronize | ISynchronizeTask | Synchronize
SynchronizeIds | ISynchronizeIdsTask | Synchronize
SynchronizeGroups | ISynchronizeGroupsTask | SynchronizeGroups
Collect | ICollectTask | Collect
Remove | IDeleteTask | Delete
Insert | IInsertTask | Insert
Update | IUpdateTask | Update
View | IViewTask | View
Hold | IHoldTask | Hold

Copyright 2024 Open Text
Version 24.2 | Last updated March 2024

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL ConnectorLib .NET 24.2

Topic Title: Write Messages to the Log