ConnectorLib C++ 23.3

# Write Messages to the Log

All of the fetch action methods you can override in `ConnectorBase` are passed a `task` object with a `Log` object accessible with `task.log()`

           task.log().always("This message is always logged");
           task.log().critical("This is logged at the critical level");
           task.log().error("Errors are logged at this level");
           task.log().warning("Warnings are logged at this level");
           task.log().normal("This is the normal level of verbosity for logs");
           task.log().full("Verbose logging");
           task.log().writeln(42, "Logged using any numeric or defined log level");

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 `writeln`, 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 | SynchronizeTask | Synchronize
synchronizeIds | SynchronizeIdsTask | Synchronize
synchronizeGroups | SynchronizeGroupsTask | SynchronizeGroups
collect | CollectTask | Collect
deleteDocs | DeleteTask | Delete
insert | InsertTask | Insert
update | UpdateTask | Update
view | ViewTask | View
hold/releasehold | HoldTask | Hold

Copyright 2022 Open Text
Version 23.3 | Last updated June 2023

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 swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL ConnectorLib C++ 23.3

Topic Title: Write Messages to the Log