Laravel Debug Tool laravel-debugbar print log messages

Source: Internet
Author: User
Tags function definition

In fact, it's better to use the façade, because the façade also introduces namespaces, so it's not good to introduce namespaces into every debug place.

Laravel-debugbar provides a global function, located in/vendor/barryvdh/laravel-debugbar/src/helpers.php, that has been defined in the Composer.json of the component for automatic loading, Therefore, you can use help functions directly, such as printing info-level log information:

Debugbar ()->info ($data);

It would be nice to call this directly.

Look at the function definition:


if (!function_exists (' Debugbar ')) {
/**
* Get the Debugbar instance
*
* @return \barryvdh\debugbar\laraveldebugbar
*/
function Debugbar ()
{
Return app (' Debugbar ');
}
}

Print the message as shown in the figure:

Laravel-debugbar is a good debugging tool, hosting the PSR-3 specification on the level of the definition of log messages, in the development can be a good use of this tool to improve the efficiency of development, debugging.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.