From 0269dccacb67f25beb39dac8f16fb3d5538c7782 Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Wed, 4 Jun 2014 11:04:21 +0200 Subject: Little improvement for the logging function. Log spamers into the logs file. --- router.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'router.php') diff --git a/router.php b/router.php index ee90947..b5112e1 100644 --- a/router.php +++ b/router.php @@ -46,13 +46,6 @@ class Router { } } - protected function log_command($command) { - global $config; - - file_put_contents($config['misc']['logs'], $command, - FILE_APPEND | LOCK_EX); - } - public function send_command($command, $parameters) { global $config; @@ -110,8 +103,8 @@ class Router { $data = $auth->send_command($complete_command); $auth->disconnect(); - $this->log_command('['.date("Y-m-d H:i:s").'] [client: '. - $this->requester.'] '.$this->host.'> '.$complete_command."\n"); + log_to_file('[client: '.$this->requester.'] '.$this->host.'> '. + $complete_command); return $data; } -- cgit v1.2.3