The Rollbar PHP SDK (just as an example) allows for logging arbitrary messages to Rollbar:
You can also send Rollbar log-like messages:
<?php
use Rollbar\Rollbar;
use Rollbar\Payload\Level;
Rollbar::log(Level::WARNING, 'could not connect to mysql server');
Rollbar::log(
Level::INFO,
'Here is a message with some additional data',
array('x' => 10, 'code' => 'blue')
);
This is really useful for certain kinds of remote debugging situations, e.g. when you haven't been able to reproduce a production error yet and need more contextual information.
What I'd like to be able to do in Clojure is something like:
(rollcage/info "some message")
,,,
(rollcage/debug "another message with some context" {:more "context"})
As far as I can tell, though, this would require a change to the API of the core/notify fn, which always expects a Throwable. I think it makes sense to have the Rollcage internals know what to do with Throwable instances when it sees them, but the current API seems to preclude certain valid use-cases of the wider Rollbar API. Or maybe I'm missing something?
Edit: to be clear, I'm happy to submit a PR for widening the API, but I thought it would be best to discuss what that wider API would look first. Thoughts?
Thanks!
The Rollbar PHP SDK (just as an example) allows for logging arbitrary messages to Rollbar:
This is really useful for certain kinds of remote debugging situations, e.g. when you haven't been able to reproduce a production error yet and need more contextual information.
What I'd like to be able to do in Clojure is something like:
As far as I can tell, though, this would require a change to the API of the
core/notifyfn, which always expects aThrowable. I think it makes sense to have the Rollcage internals know what to do withThrowableinstances when it sees them, but the current API seems to preclude certain valid use-cases of the wider Rollbar API. Or maybe I'm missing something?Edit: to be clear, I'm happy to submit a PR for widening the API, but I thought it would be best to discuss what that wider API would look first. Thoughts?
Thanks!