forked from SimplesIP/pabx-app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
657 B
24 lines
657 B
<?php |
|
$filename = "/var/log/asterisk/display_erros.log"; |
|
error_reporting(E_ALL); |
|
ini_set('display_errors', 0); |
|
ini_set("memory_limit", "512M"); |
|
|
|
|
|
|
|
/* * ****** DESCOMENTE AS LINHAS ABAIXO PARA UM LOG DETALHADO ****** */ |
|
|
|
ini_set('log_errors', true); |
|
ini_set('error_log', $filename); |
|
ini_set('log_errors_max_len', 4096); |
|
|
|
if (!file_exists('/var/log/asterisk/display_erros.log')) { |
|
file_put_contents($filename, ''); |
|
exec(" chown pbx:pbx {$filename}"); |
|
} else { |
|
if (filesize($filename) >= 1073741824) { |
|
unlink($filename); |
|
file_put_contents($filename, ''); // Cria um arquivo novo |
|
exec(" chown pbx:pbx {$filename}"); |
|
} |
|
}
|
|
|