log method improvement

This commit is contained in:
Steffen Schröder
2014-01-05 14:13:18 +01:00
parent 5f27ab3e4a
commit 7c2508a0af
2 changed files with 58 additions and 50 deletions

View File

@ -130,7 +130,10 @@ class ManiaControl implements CommandListener {
*
* @param string $message
*/
public function log($message) {
public function log($message, $stripCodes = false) {
if ($stripCodes) {
$message = Formatter::stripCodes($message);
}
logMessage($message);
}
@ -364,8 +367,7 @@ class ManiaControl implements CommandListener {
// Set api version
if (!$this->client->query('SetApiVersion', self::API_VERSION)) {
trigger_error(
"Couldn't set API version '" . self::API_VERSION . "'! This might cause problems. " . $this->getClientErrorText());
trigger_error("Couldn't set API version '" . self::API_VERSION . "'! This might cause problems. " . $this->getClientErrorText());
}
// Connect finished