Guide to the LiveAPI System - The debug_log_json() Method

Description

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.

Example


LiveAPI PHP Class

1
2
// Log a JSON error to the LiveAPI error log.
$cpanel->debug_log_json("{whatami:'JSON',message:'Hello'}");




LiveAPI Perl Module

1
2
# Log a JSON error to the LiveAPI error log.
$cpliveapi->debug_log_json("{whatami:'JSON',message:'Hello'}");



Parameters

 Parameter

Type

Description

Possible values

Example

message

 string 

 The error message to log. 

 A valid JSON string. 

 {whatami:'JSON',message:'Hello'} 

 

Returns

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

  • 1 — Success.
  • 0 — Failure.

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....