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 set_debug() Method
Skip to end of metadata
Go to start of metadata



The set_debug() method sets the amount of debug information to store in LiveAPI's debug 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

// Turn off logging to the debug error log.

LiveAPI Perl Module

# Turn off logging to the debug error log.


ParameterTypeDescriptionPossible valuesExample
debug_levelintegerThe debug log's setting.
  • 0 — The LiveAPI system does not log error messages.
  • Any other integer value — The LiveAPI system logs any error messages that have a level value that is greater than or equal to this value.


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

  • 1 — Success.
  • 0 — Failure.