Last active
December 17, 2015 15:29
-
-
Save kumavis/5632452 to your computer and use it in GitHub Desktop.
Ember error phone home
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# === | |
# = This helper sends client errors home to the server for logging | |
# === | |
# TODO: include some client diagnostics, browser type etc | |
# Grab standard error callback | |
_super = Ember.Logger.error | |
# Overwrite error callback to phone home | |
Ember.Logger.error = (message) -> | |
# fire standard error callback | |
_super(message) | |
# send message to server | |
jQuery.post "/log/error" | |
data: message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment