Snowy Evening Help

Remote Error Reporting

Our biggest wish before we built snowy was to have a way for our applications (which were already recording errors to a log files) to have an easy way of a) alerting us when new errors had been logged so that we didn't need to manually check remote application installations, and b) log the error into our bug tracking application.

While possible, getting a system like that working with our existing bug trackers wasn't going to be easy, or pleasant.

In Snowy, it's both. As long as your application can send a JSON-encoded POST request over HTTP, you're able to take advantage of this amazing feature.

Visit your project page and copy down the API key and project id, both of which you need for this to work.

Then, build a class that collects the errors from your application and send the content, as a JSON-encoded object to:

https://snowy-evening.com/api/integration/error_log

The format of your POST request and JSON object should match the following structure:

api_key => $2a$08$2Mp4gNmdjfhgdfgb7kZJuZ.P4PQYf56qoHhhvUFCruVqT3p0Osju

project_id => 114

payload => {

"application" :"Test Project", "versioncomplete" :"1.0 Beta 1 Build 55", "version" :"1.0", "build" :"Build 55", "date" :"2020-06-08 11:15:07", "gmdate" :"2020-06-08 18:15:07", "visitorip" :"127.0.0.1", "referrerurl" :"http://127.0.0.1/snowy-evening-api-examples/remoteerrors/", "requesturi" :"/snowy-evening-api-examples/remoteerrors/snowy-errors.php", "useragent" :"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1", "errortype" :"PHP Warning", "errormessage" :"Mock API Error: You Broke Something Friend", "errorno" :2, "file" :"/usr/local/apache/htdocs/snowy-evening-api-examples/remoteerrors/snowy-errors.php", "line" :123, "trace" :[{ "file" :"/var/www/snowy-evening-api-examples/remoteerrors/snowy-errors.php", "line" :123, "function" :"date" }, { "file" :"/var/www/snowy-evening-api-examples/remote_errors/snowy-errors.php", "line":54, "function":"raise" }] }

If you're using PHP5, we already have a class that you can easily integrate:

https://github.com/botskonet/snowy-evening-api-examples/blob/master/remote_errors/snowy-errors.php

If not, we'd appreciate any submissions of libraries for other languages, which we'll include the above repository.