Skip to content

Commit

Permalink
Added log dir and enabled error log
Browse files Browse the repository at this point in the history
  • Loading branch information
tbreuss committed Jan 30, 2016
1 parent 144c31c commit 96bce37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions log/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
5 changes: 4 additions & 1 deletion system/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ class ErrorHandler
*/
public function register()
{
ini_set('display_errors', false);
ini_set("display_errors", 0);
ini_set("log_errors", 1);
ini_set("error_log", sprintf("%s/log/%s-error.log", dirname(__DIR__), date('Y-m')));

set_exception_handler([$this, 'handleException']);
set_error_handler([$this, 'handleError'], error_reporting());
register_shutdown_function([$this, 'handleFatalError']);
Expand Down

0 comments on commit 96bce37

Please sign in to comment.