You can add logging to scripts.
The dw.system.Logger class includes the following methods:
The dw.system.Log class lets you write to a specific log level and category. This class has the following methods:
For NDC support, the static method LogNDC getNDC() provides access to the NDC. The NDC property supports access to the nested diagnostic context.
The following methods are instance methods and not class methods:
The API class dw.system.LogNDC has the following methods.
Method | Description |
---|---|
push( String message ) : void | Pushes new diagnostic context information for the current script execution. |
peek() : String | Looks at the last diagnostic context at the top of this NDC without removing it. The returned value is the value that was pushed last. If no context is available, then the empty string "" is returned. |
pop() : String | Call this method before leaving a diagnostic context. The returned value is the value that was pushed last. If no context is available, then the empty string "" is returned. |
remove() : void | Removes the diagnostic context for this script call. |