Error logging and debugging (v2)
10 April 2022 197 views | Documentation v2
Tuskfish logs errors to trust_path/log/tuskfish_log.txt. So if you are experiencing problems download this logfile and take a look inside, it will give you the file name, line number and type of errors that have been encountered.
To enable on-screen error reporting on a development site edit trust_path/libraries/tuskfish/header.php:
// Set error reporting levels and custom error handler. \ini_set('display_errors', '0'); // Needs to be set to 0 for production, temporarily set to 1 for debug. \ini_set('log_errors', '1'); \error_reporting(E_ALL);
You can also enable on-screen debugging by editing the file trust_path/libraries/tuskfish/class/Tfish/Logger.php and commenting/uncommenting the following code in the function logErrors():
// Debug only - comment OUT in production site:
// echo '<p>' . print($message) . '</p>';
// Debug only - UNCOMMENT in production site.
As errors will appear on-screen you may wish to close your site to the public (via the preferences page) while you debug it. When you are finished make sure you revert the code back to its production state before re-opening it to public access.
Copyright, all rights reserved.