Skip to content

Instantly share code, notes, and snippets.

@kumavis
Last active December 17, 2015 15:29
Show Gist options
  • Save kumavis/5632452 to your computer and use it in GitHub Desktop.
Save kumavis/5632452 to your computer and use it in GitHub Desktop.
Ember error phone home
# ===
# = 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