Skip to content

Commit

Permalink
* Write log in a file using php function file_put_contents instead o…
Browse files Browse the repository at this point in the history
…f using exec()
  • Loading branch information
Lionel Assepo committed Nov 27, 2014
1 parent ad3749c commit 015e875
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions www/class/centreonLog.class.php
Expand Up @@ -100,9 +100,9 @@ public function insertLog($id, $str, $print = 0, $page = 0, $option = 0)
$string = str_replace("*", "\*", $string);

/*
* print Error in log file.
* Write Error in log file.
*/
exec("echo \"".$string."\" >> ".$this->errorType[$id]);
file_put_contents($this->errorType[$id], $string . "\n", FILE_APPEND);
}

public function setUID($uid)
Expand Down Expand Up @@ -174,9 +174,9 @@ public function insertLog($id, $str, $print = 0, $page = 0, $option = 0)


/*
* print Error in log file.
* Write Error in log file.
*/
exec("echo \"".$string."\" >> ".$this->errorType[$id]);
file_put_contents($this->errorType[$id], $string . "\n", FILE_APPEND);
}

}
Expand Down

0 comments on commit 015e875

Please sign in to comment.