-
Notifications
You must be signed in to change notification settings - Fork 4
Debugging
edmundask edited this page Dec 27, 2011
·
1 revision
Sprinkle does not interrupt the flow of the application (it does not throw warnings or errors) if there's something wrong with the YAML file parsing, asset loading etc. Instead it logs everything using the native CodeIgniter function log_message(). All messages are treated as debug messages, so while you're developing your application, it is wise to set the appropriate log threshold.
<?php
// 2 = Debug Messages
$config['log_threshold'] = 2;
?>or
<?php
// 4 = All Messages
$config['log_threshold'] = 4;
?>if you want to keep track of all messages (error, debug, informational).
For example, you use tabs instead of spaces in YAML files which causes the assets not to be loaded. In the log file it may look something like this:
DEBUG - 2011-12-27 20:10:41 --> Sprinkle: [WARNING] There was a problem parsing YAML file: asset_routes.yml
In the future log messages will be more descriptive.