Docs‎ > ‎Debug your API Project‎ > ‎

View Logging Information

View logging information to understand what rules fired and what SQL was issued. The Log information includes both system-generated information (e.g, rule and sql execution), plus information you can generate using JavaScript Context.

Set up the Log

You can configure your auth token on the Manage, Auth Tokens, Logging tab. For general debugging, use Debug level for Rules Engine and Database access.

Access the Log and Log Entries

You can access the log after your transaction completes. Click the logs link in the left hand column, and select your Auth Token. Live API Creator saves the last several requests. You can select one and see the log entries. The log level and the log areas you check control the amount of log information. The Finer debug log level results in more detail, showing each rule that fires and its effect on the row. Use the Finest debug log level for system debug information.

Log Entries display in the lower pane, and contain:
  • + sign for detail expansion (e.g, see full row content)
  • the line number is color coded to reflect its log level
  • the log area is shown next
  • the log information makes up the rest of the line.  > signs denote rule chaining.
The following log reflects a PUT changing a Lineitem Quantity (line 3), which adjusts the orders' amount_total (line 4) which in turn adjusts the customers' balance (line 5). Lines 9-11 show the actual update SQLs (note the adjustment logic is a 1 row update, not a SQL select sum).  

The logic engine produces each of these lines as entries. The entries are formatted as follows:
  1. Forward Chaining nest-level indentation. The indentation depicts the cascade/adjustment forward chaining, enabling you to skip over portions of the log as needed.
  2. Reporting Domain Object. The bracketed string identifies the Business Logic Component reporting the log entry, and how it was called. For example, [Purchaseorder[6] ADJUSTED via lineitemsList] means:
      • Purchaseorder is reporting.
      • Purchaseorder was invoked due to an adjustment via Lineitem.lineitemsList (the class/accessor through which the adjustment is occurring)
        Note: USER means the logic was invoked due to a user (REST client) update.
  3. Message. The next string is the message (e.g., what logic is being executed).
  4. Column Values. The column values of the Table are appended to each log entry (including old values where applicable). This information provides significant insight into the why the logic execution produced the result shown. Altered attributes are grouped to the front, to make changes easier to spot.
The following image shows how the entries are formatted:

Salient log Messages:
  • Adjust - child adjusting parentAn entry such as Adjusting summed attribute: balance+=50.0000 signifies that a child is adjusting a parents sum/count. After all the adjustments are complete for a given parent, you will see an indentation as the system then invokes the parent logic (i.e., a Forward Chain)
  • Cascade An entry such as .. cascading to child ...lineitems signifies that a parent is cascading a changed Parent Reference value to child rows. This will be followed by an indentation as the system then invokes the child logic (i.e., a Forward Chain)
  • Formula An entry such as ==> Formula changes: isReady reflects the execution of a formula that changed the derived value.
Note: A log entry is not made if the value did not change.
  • Action An entry such as Action(actionClonePurchaseorder) invoking on means that an action event is firing.
  • Checking - these simply confirm the phases of logic execution, and frequently are useful in interpreting ensuing entries. You can investigate a more complex example, such as Allocation.

Reveal Logging Detail

You can reveal logging detail by clicking the + button in the log or reveal formatted detail by clicking the grey text. The Auth Tokens box shows the active connections for this API Project. The Requests box shows all GET/PUT/POST/DELETE. Select one of these to display the details. You can purge the logs and reload the page by clicking Refresh.

Output Messages to the Log

You can output messages to the log in one of two ways - the latter will be nested inside the transaction nest level:

log.debug('Customer balance is: ' + currentObject.balance);
logicContext.logDebug('Customer balance is: ' + currentObject.balance);