You can try using the LOAD DATA INFILE function of mysql.
From the systax you have tried and had no luck.
So write a little script.
For example. ( completely untested )
$data = file( 'log.txt' );
$data = str_replace( "\n",'',$data ); // get rid of \n
foreach( $data as $s )
{
$fields = explode( ",",$s )
$sql = "INSERT INTO table_name ( $field[0],$field[1],$field[2],$field[3] )";
if( mysql_query( $sql )===FALSE )
{
echo 'error in sql'.mysql_error();
break;
}
}