Debugging and Logs
Table of contents
1. Overview Table of Contents
This framework provides tools for troubleshooting issues with your project. The first tools to be discussed is the debugging interface provided by the filp/whoops project. The second is log files.
2. filp/whoops Table of Contents
filp/whoops is a pretty page handler for displaying errors within the browser. This tool is also included with the Laravel framework. Thus, inclusion of this tool within this frameworks makes the switch relatively easy.
3. Logs Table of Contents
We support two types of log files that can be found at storage/logs
. The app.log
is for logging events when using the framework’s front end. The cli.log
file logs events associated with Command Line Interface (CLI) console commands.
Since log files can take up a lot of space you can clear them by running the following command:
php console log:clear
This command has 3 flags that can be set.
- –all - Clears all log files
- –app - Clears the app.log file
- –cli - Clears the cli.log file
If the framework has issues writing to the logs files run the following command:
sudo chown ${user}:${user} -R /storage/logs
3. Helper Functions Table of Contents
There are 3 functions in the Global Namespace that are used for debugging.
- cl - A wrapper for the JavaScript console.log function.
- dd - A wrapper for the VarDumper class’ dump function that ends execution of the application where the function is called.
- dump - A wrapper for the VarDumper class’ dump function that continues execution of the application after where the function is called.