# wp-console/2.4.0/includes/Core/DebugLog/DebugLog.php

WP Console – WordPress PHP Console powered by PsySH, version 2.4.0. 32 lines.

- Page: https://pluginprobe.com/plugins/wp-console/2.4.0/code/includes/Core/DebugLog/DebugLog.php
- Raw: https://pluginprobe.com/plugins/wp-console/2.4.0/raw/includes/Core/DebugLog/DebugLog.php
- Modified: 2023-08-09T08:23:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-console/2.4.0/code/includes/Core/DebugLog/DebugLog.php#L10-L20`.

```php
<?php

namespace WPConsole\Core\DebugLog;

class DebugLog {

    /**
     * Class constructor
     *
     * @since 1.0.0
     *
     * @return void
     */
    public function __construct() {
        add_filter( 'wp_console_rest_controllers', [ $this, 'add_rest_controller' ] );
    }

    /**
     * Add REST controller
     *
     * @since 1.0.0
     *
     * @param array $controllers
     *
     * @return void
     */
    public function add_rest_controller( $controllers ) {
        $controllers->debug_log = new RestController();
        return $controllers;
    }
}

```
