logs.php 704 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /*
  3. * Opciones de configuración de los logs.
  4. */
  5. return (static function () {
  6. $options = [
  7. 'error_reporting' => (E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED),
  8. 'display_errors' => false,
  9. 'display_startup_errors' => false,
  10. 'log_errors' => true,
  11. 'error_log' => '../writable/errors.log',
  12. 'ignore_repeated_errors' => 1,
  13. 'ignore_repeated_source' => 1
  14. ];
  15. if (\App\Utils\Env::get('APP_ENVIRONMENT') === 'development') {
  16. $options = array_merge($options, [
  17. 'error_reporting' => E_ALL,
  18. 'display_errors' => true,
  19. 'display_startup_errors' => true
  20. ]);
  21. }
  22. return $options;
  23. })();