This is a debug script for php programming.Especially, WordPress.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
console_log.php

README.md

console_log

This is a debug script for php programming.Especially, WordPress.

Sample usage

Like var_dump(), but console_log() write logs to a prepared file:

<?php

// Write to this log file.
define('CONSOLE_LOG_FILE', '/var/log/console.log');

// something to debug variable or literal value.
$foo = 'a';
console_log($foo);

How to display a log file in real time.

Below command is a one of the best solution that will give you a scrolling view of the logfile for any Unix-like operating system.

But, you should set the permission of /var/log/console.log to be writable.

tail -f /var/log/console.log