Docs‎ > ‎Debugging‎ > ‎

Logging

You can view logging information using the Logic Designer as described below.  The Log information includes both system-generated information, plus information you can generate using JavaScript Context.

Log Setup

Configure your APIKey as shown below.  

For general debugging, use Debug level for Rules Engine and Database access.


Log Analysis: Requests and Log Entries

You can access the log after your transaction completes.  Click the logs link in the left hand column, and select your API key.

The system saves the last several Requests - select one and see the Log Entries below.  The amount of log information is controlled by the log level, and the log areas you check.  Finer would result in more detail, showing each rule that fires and its effect on the row.  Finest is typically used for system debug information.

Log Entries are 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 log below 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).  

Each of these lines is produces by the logic engine; such 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), as further described below
  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.


Salient log Messages:
  1. Adjust - child adjusting parent
    An 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)
  2. 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)
  3. Formula
    An entry such as ==> Formula changes: isReady reflects the execution of a formula that changed the derived value.
    • Note: no log entry is made if the value did not change.
  4. Action
    An entry such as Action(actionClonePurchaseorder) invoking on means that an action event is firing
  5. 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.


Logging Detail

You can click the + button in the log to reveal detail, or the grey text to reveal formatted detail.