O'Reilly logo

Learning Laravel 4 Application Development by Hardik Dangar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Logging data with Laravel

Another important aid to understanding why errors occur is the logging of important events during page execution. Laravel provides logging methods that we can use to save a lot of things that happened in the page. This is very useful in certain situations, such as When you are doing beta testing and users complain that certain pages or processes are not working; you can actually debug things via this data and can create a test case for finding errors that the users face. This can be done using the following code:

Log::debug('input data at pointA is '. Input::get() );
Log::info('User completed point x');
Log::notice('functionx is called');
Log::emergency('User was able to reach pageA without authentication');

You can use ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required