New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log 500 errors #62
Comments
Closure Compiler uses an HTTP API. I'm not sure how much error handling I've built into that wrapper. |
By default, errors trigger a fallback compression via JSMin: https://github.com/mrclay/minify/blob/master/min/lib/Minify/JS/ClosureCompiler.php#L58 |
Yeah, but the browser only reports a 500 error. How can I log that $response somewhere? It occurs, for example, in calls like this: $("#stats").dataTable({
"sPaginationType": "full_numbers",
"aoColumnDefs": [
{ "iDataSort": sortIndex, "aTargets": [ sortIndexTargets ] }
],
"bJQueryUI": true, //notice this last comma
}); |
In min/config.php, try this: class MyLogger {
public function log($msg, $label) {
error_log("$label: $msg");
}
}
$min_errorLogger = new MyLogger(); |
this works great, thank you. |
It seems that my Apache is not correctly logging 500 errors generated by minify, for example when a JS file has a syntax error and the compiler can't minify it.
I'm using ClosureCompiler:
All my other 500 errors seem to be correctly reported in /var/log/apache2/error.log.
I tried debugging a little but I'm not sure where to look nor I'm sure it's a minify issue.
The text was updated successfully, but these errors were encountered: