Javascript-error-logging is a project mainly written in JavaScript, it's free.
A javascript function that will trap errors and report them with a pixel that can be tracked in your server logs.
404: Not Found