diff --git a/www/application/controllers/Dash.php b/www/application/controllers/Dash.php
index ced8ac7d..1b80decc 100644
--- a/www/application/controllers/Dash.php
+++ b/www/application/controllers/Dash.php
@@ -6,9 +6,10 @@ class Dash extends Users_Controller {
function __construct() {
parent::__construct();
- if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
- redirect(home);
- }
+ $this->logger->info('Dash extends Users_Controller contructor');
+ if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
+ redirect(home);
+ }
}
public function help(){
diff --git a/www/application/core/WRB_Controller.php b/www/application/core/WRB_Controller.php
index f67e6891..e41e85b0 100644
--- a/www/application/core/WRB_Controller.php
+++ b/www/application/core/WRB_Controller.php
@@ -1,5 +1,10 @@
''
);
-
-
var $template_nohead = array(
'table_open' => "
",
'thead_open' => '',
@@ -45,12 +48,27 @@ class WRB_Controller extends CI_Controller {
'cell_alt_end' => '',
'table_close' => '
'
);
+
public $data = array();
+ var $logger;
+
function __construct() {
parent::__construct();
$this->load->library(array('session', 'lib_login'));
+
+ // Create the logger
+ $this->logger = new Logger($_SERVER['SERVER_ADDR']);
+
+ // Create Graylog GELF TCP transport
+ $transport = new Gelf\Transport\TcpTransport("10.0.0.112",12201);
+
+ // Create GELF handler
+ $handler = new GelfHandler(new Gelf\Publisher($transport));
+
+ // Now add GELF handler to logger
+ $this->logger->pushHandler($handler);
}
public function paginationConfig($urlSeg,$perPage,$numRows,$linkPath,$numLnk){
diff --git a/www/composer.json b/www/composer.json
index 1a32a3c2..22c532c5 100644
--- a/www/composer.json
+++ b/www/composer.json
@@ -17,7 +17,9 @@
"phpseclib/phpseclib": "^3.0",
"hybridauth/hybridauth" : "~3.7.1",
"google/apiclient":"^2.12.1",
- "paragonie/sodium_compat": "^1.17"
+ "paragonie/sodium_compat": "^1.17",
+ "monolog/monolog": "^2.8",
+ "graylog2/gelf-php": "^1.7"
},
"suggest": {
"paragonie/random_compat": "Provides better randomness in PHP 5.x"