global.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Application Error Logger
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here we will configure the error logger setup for the application which
  8. | is built on top of the wonderful Monolog library. By default we will
  9. | build a rotating log file setup which creates a new file each day.
  10. |
  11. */
  12. Log::useDailyFiles(__DIR__.'/../storage/logs/log.txt');
  13. /*
  14. |--------------------------------------------------------------------------
  15. | Application Error Handler
  16. |--------------------------------------------------------------------------
  17. |
  18. | Here you may handle any errors that occur in your application, including
  19. | logging them or displaying custom views for specific errors. You may
  20. | even register several error handlers to handle different types of
  21. | exceptions. If nothing is returned, the default error view is
  22. | shown, which includes a detailed stack trace during debug.
  23. |
  24. */
  25. App::error(function(Exception $exception, $code)
  26. {
  27. Log::error($exception);
  28. });
  29. /*
  30. |--------------------------------------------------------------------------
  31. | Require The Filters File
  32. |--------------------------------------------------------------------------
  33. |
  34. | Next we will load the filters file for the application. This gives us
  35. | a nice separate location to store our route and application filter
  36. | definitions instead of putting them all in the main routes file.
  37. |
  38. */
  39. require __DIR__.'/../filters.php';