Check documentation for the latest version of dhtmlxSuite Error Handling and Logging DHTMLX Docs

Error Handling and Logging

While developing we strongly recommend using logs for errors detection.

Server-side logging

DHTMLX permits to control logging in two ways:

  • Basic
  • Detailed

Basic

If any error occurs during the data processing, the client-side data processor object will receive the "error" action containing short info about the problem (full info will be written to the log).

<cfset grid.enable_log(variables,getCurrentTemplatePath() & "_debug.log")>
  • variables - just let the matter rest. It's a build-in variable.
  • path - an absolute or relative path to the text file where a log will be written.

A relative path is specified relatively to a temporary folder the path to which you can get by using the GetTempDirectory() method.

Detailed

When a critical error occurs, all log records for current session (full error info) will be sent to the client and shown in a browser (useful for debugging, not recommended for production):

<cfset grid.enable_log(variables,getCurrentTemplatePath() & "_debug.log",true)>
  • variables - just let the matter rest. It's a build-in variable.
  • path - absolute or relative path to the text file where log will be written.
  • The third parameter enables detailed mode.

Adding custom records to the log

During the development process you may need to write some custom data to the log (can be useful for custom server-side events).

In such a case you can use the default log as:

<cfinvoke component="dhtmlxConnectors.LogMaster" method="do_log">
    <cfinvokeargument name="message" value="any text here">
</cfinvoke>
Back to top