Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Laravel Errors & Logging

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 142
    Comment on it

    Error logging handler is defined or registered in the app/start/global.php. We will define or configure logger to use a single log. In laravel we have MONOLOGY logging library. By using Monolog offers we will use n number of handlers.

    Example

    $logFile = 'laravel.log';
    
    Log::useDailyFiles(storage_path().'/logs/'.$logFile);
    


    Note: For closing error log we will make false debug in app/config/app.php file.

    Error Handling

    All the error are handled using the file app/start/global.php.

    App::error(function(Exception $exception)
    {
        Log::error($exception);
    });
    


    This is the most basic error handler. There are more handlers are also available.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: