[Development Guides Home](/guides) >> [Guide to the LiveAPI System](/guides/guide-to-the-liveapi-system) >> [LiveAPI Methods](/guides/guide-to-the-liveapi-system/guide-to-the-liveapi-system-liveapi-methods)

# Guide to the LiveAPI System - The debug_log_json() Method

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


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

### LiveAPI Perl Module


```perl
# 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.