Logging and debugging

Logging data

Depending on the logging configuration in your custom config.xml you can use yeager's logging functions to push data to the file logger, Firebug or echoing it.
  1. // will only get logged to all buckets
  2. sLog()->error("this is an error");
  3.  
  4. // will only get logged to buckets with log level 2 or higher
  5. sLog()->warn("this is a warning");
  6.  
  7. // will only get logged to buckets with log level 3 or higher
  8. sLog()->log("this is a common log entry");
  9.  
  10. // will only get logged to buckets with log level 4
  11. sLog()->debug("this is a debug message");

Dumping data

  1. public function onRender ($args = NULL) {
  2.     $page = this->getPage();
  3.     $content = this-getContent();
  4.     var_dump($content);
  5.     die();
  6. }