coderberry / airbrake-grails

Airbrake Client for Grails
4 stars 8 forks source link

logging error without exception doesn't work with Errbit #33

Closed ghost closed 11 years ago

ghost commented 11 years ago

I configured

grails.plugins.airbrake.includeEventsWithoutExceptions = true

and tested

log.error 'something went wrong'

in an application that logs to Errbit, rather than Airbrake. Errbit responds with a HTTP 500 to the data that is sent. My suspicion is that Errbit doesn't like an empty backtrace element:

<backtrace/>

but I think if I change it to

<backtrace></backtrace>

it might work. I guess you don't use Errbit, so I can submit a pull request for this if you wish?

jonspalmer commented 11 years ago

That's pretty strange given it is completely valid xml. I guess a pull request if its easy but it might be that airbrake requires the empty tag.

ghost commented 11 years ago

Well it's only a hunch, but I vaguely recall Errbit previously rejecting

<tag/>

but accepting:

<tag></tag>

If it turns out to be true, I'll check that this doesn't break Airbrake before submitting the pull request. BTW, I think you will need to accept/reject this pull request, before I can submit a new one.

jonspalmer commented 11 years ago

I will take a look. If you create a new pull request from a feature branch they can be considered and pulled independently.

ghost commented 11 years ago

I didn't know that (thanks), I'll submit a pull request for this issue on a feature branch if the other pull request has not been reviewed by then.