Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback


Code Sample



The example below is from an integration processor that imports flat files into a DataSet. The example logs several messages using a variety of severity levels.

## Example

SeverityComments
DebugThis is for debugging purposes only. These messages are not logged unless debugging is enabled. Debugging can be enabled for the integration connection or job.
InfoThis is for informational purposes. For example, you could log a message stating that a process within the integration job has completed. When executing a real-time job, these messages will not be logged unless debugging is enabled. Debugging can be enabled for the integration connection or job.
WarnThis indicates that something probably shouldn't be happening, but the job will continue execution. For example, the FieldMap postprocessor may not find a lookup object that really should be there. Job executions can be failed if a specified number of Warn messages are logged. If this happens, the job will stop execution and not continue.
ErrorThis indicates something happened that shouldn't, but the job will continue execution. For example, the FieldMap postprocessor may not find a lookup object that is required and causes an error if it cannot be found. Job executions can be failed if a specified number of Warn messages are logged. If this happens, the job will stop execution and not continue.
FatalThis indicates that something caused the job to fail and not continue.

The job logs are organized by severity level or **IntegrationJobLogType**. There are five severity levels: **Debug**, **Info**, **Warn**, **Error**, and **Fatal**. Each severity level serves a different purpose and dictates different behavior in the application.

The messages that are written to the job logs appear in two places in the **Admin Console**. The first place is at **Administration** \> **Jobs** \> **Job Definitions**. You must then select the job definition, select the **History** finger tab, and select the history record. Then, select the **Job Logs** finger tab. The other place is at **Administration** \> **Jobs** \> **All Job History**. Find and select the correct history record. Then, select the **Job Logs** finger tab.

## Remarks



Determines if the job has reached its limit of logged warnings or errors.

### ThresholdReached()

True if the message is successfully logged. False if the logging threshold is reached for either Warn or Error messages.

**Returns**

  • **jobLogType** – The severity level of the log message.

  • **message** – The log message.

**Parameters**



Attempts to write a log message using the specified severity level.

### TryAddLogMessage(IntegrationJobLogType, string)

  • **message** – The log message.

  • **jobDefinitionStep** – The job step that is currently being executed.

**Parameters**



Writes a formatted log message for the job step using the Fatal severity level.

### Fatal(string, JobDefinitionStep)

  • **message** – The log message.

  • **jobDefinitionStep** – The job step that is currently being executed.

**Parameters**



Writes a formatted log message for the job step using the Error severity level.

### Error(string, JobDefinitionStep)

  • **message** – The log message.

  • **jobDefinitionStep** – The job step that is currently being executed.

**Parameters**



Writes a formatted log message for the job step using the Warn severity level.

### Warn(string, JobDefinitionStep)

  • **message** – The log message.

  • **jobDefinitionStep** – The job step that is currently being executed.

**Parameters**



Writes a formatted log message for the job step using the Info severity level.

### Info(string, JobDefinitionStep)

  • **message** – The log message.

  • **jobDefinitionStep** – The job step that is currently being executed.

  • **logAsDebug** – If true, the message will logged using the Debug severity level. Otherwise, the message will be logged using the Info severity level.

**Parameters**



Writes a formatted log message for the job step using the either the Debug or Info severity level.

### DebugOrInfo(string, JobDefinitionStep, bool)

  • **message** – The log message.

  • **jobDefinitionStep** – The job step that is currently being executed.

**Parameters**



Writes a formatted log message for the job step using the Debug severity level.

### Debug(string, JobDefinitionStep)

  • **message** – The log message.

**Parameters**



Writes a log message using the Fatal severity level.

### Fatal(string)

  • **message** – The log message.

**Parameters**



Writes a log message using the Error severity level.

### Error(string)

  • **message** – The log message.

**Parameters**



Writes a log message using the Warn severity level.

### Warn(string)

  • **message** – The log message.

**Parameters**



Writes a log message using the Info severity level.

### Info(string)

  • **message** – The log message.

  • **logAsDebug** – If true, the message will logged using the Debug severity level. Otherwise, the message will be logged using the Info severity level.

**Parameters**



Writes a log message using the either the Debug or Info severity level.

### DebugOrInfo(string, bool)

  • **message** – The log message.

**Parameters**



Writes a log message using the Debug severity level.

### Debug(string)

This happens when a lookup object can not be found based on the lookup field mapping specified in the job definition. Sometimes, this indicates that the field mapping is incorrectly configured or the lookup data returned from the query is empty.

**Remarks**

**lookupErrorHandling** – The specified error handling for the lookup field mapping. This is specified in the Admin Console during field mapping configuration.

  • **message** – The log message.

**Parameters**



Writes a log message for a missing lookup value.

### LogMissingLookup(string, LookupErrorHandlingType)

## Methods

A class that is capable of writing log messages during the execution of an integration job.