# dhtmlxconnector:error_handling_and_logging [DHX documentation]

DHTMLX Docs & Samples Explorer

Index
dhtmlxconnector
Usage Guide

## Error Handling and Logging

During development phase, we strongly recommend to use server side logs, which can be enabled as

            $gridConn->enable_log("path to log file");

In the code string above you should specify only one parameter:

- absolute or relative path to text file where log will be written

If any error occurs during data processing client side data processor object will receive “error” action, which will contain short info about the problem (full info will be written in the log ) If you want to show full error info on client side you should use the following code string (useful for debug, not recommended for production )

            $gridConn->enable_log("path to log file",true);

In such mode, when critical error occurs all log records for current session will be send to client and shown in browser.

### Dataprocessor logging

Dataprocessor has its own client side logger, which can be enabled by including one additional js file - dhtmlxdataprocessor_debug.js

### Adding custom records to the log

During development , you may have need to write some custom data to the log ( can be useful for custom server side events ), in such case you can use default log as

             LogMaster::log("any text here");