Salve io genero un file di log con questa funzione
function statisticaErrore($type,$msg,$file,$line){
global $rootSito;


$errorStr = "\n\nData: ".date("d-m-Y H:i:s", mktime())."\n";
$errorStr .= "Tipo errore: $type\n";
$errorStr .= "Messaggio errore: $msg\n";
$errorStr .= "File: $file($line)\n";
$errorStr .= "Host: ".$_SERVER['HTTP_HOST']."\n";
$errorStr .= "Client: ".$_SERVER['HTTP_USER_AGENT']."\n";
$errorStr .= "Client IP: ".$_SERVER['REMOTE_ADDR']."\n";
$errorStr .= "REQUEST URI: ".$_SERVER['REQUEST_URI']."\n";
echo nl2br("Si e verificato un errore interno della pagina.\n
Il seguente messaggio mostra l'errore:
$errorStr");

if(file_exists($rootSito."/Connections/log.txt")){
$fp=@fopen($rootSito."/Connections/log.txt","r");
while(!feof($fp)){
$varCont.=fgetc($fp);

}
fclose($fp);
$contenuto=$errorStr.$varCont;
$fp=@fopen($rootSito."/Connections/log.txt","w");
fwrite($fp,$contenuto);
fclose($fp);
}
break;
exit();
}

}
inserendo nella pagina questa riga
set_error_handler("statisticaErrore");

il problema è che considera come errori anche i notice.
esiste un modo per non far inserire tale messaggio.
Tenete presente che sto su hosting condiviso senza poter usare ini_set()

Grazie