We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Child pages
  • Guide to the LiveAPI System - The debug_log_json() Method
Skip to end of metadata
Go to start of metadata



The debug_log_json() method writes JSON data to the debugging log file.

  • By default, LiveAPI environments log debugging data to the /home/user/.cpanel/LiveAPI.log.rand file, where user is the cPanel account's username, and rand is a random string that cPanel & WHM generates.


LiveAPI PHP Class

// Log a JSON error to the LiveAPI error log.

LiveAPI Perl Module

# Log a JSON error to the LiveAPI error log.


ParameterTypeDescriptionPossible valuesExample
messagestringThe error message to log.A valid JSON string.



This method returns a boolean value that indicates success or failure:

  • 1 — Success.
  • 0 — Failure.