Redirect system.log output

One of the features I’ve felt I’ll need before heading in to the Operations side of Electric Imp is the ability to have access to the system log. To that end, I created a function today that allows me to log data to the GroveStream account tied to the device. I can now use this function in lieu of “system.log” and permanently log my data to GroveStreams. I’ll be posting that code in case others would benefit.

However, I’ve also realized that although I can call the function to log any data via my agent and device code, I can’t capture log entries that come from the EI platform (ex Device disconnected, device restarted due to loss of WiFi, etc.). What would be nice is the ability to identify a function to be called by the EI system whenever it is posting messages to the system log.

Did you post the file? :slight_smile:

The forthcoming IDE API allows you to fetch data from the log to your local machine, including errors.

However, this doesn’t enable the imp to push errors to arbitrary other servers - it’s a pull system only.

The issue with providing code that will trap and report errors is… errors in that code.

I did post it under “Logging to GroveStreams in lieu of system.log”

I thought it best to keep it as a separate discussion.