# Logging all exceptions

**URL:** <https://www.ruby-forum.com/t/logging-all-exceptions/160180>\
**Category:** Rails\
**Created:** [February 12, 2009, 4:59pm UTC](https://www.ruby-forum.com/t/logging-all-exceptions/160180 "2009-02-12T16:59:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 12, 2009, 4:59pm UTC](https://www.ruby-forum.com/t/logging-all-exceptions/160180/1 "2009-02-12T16:59:32Z")

</div>

Hey everyody,

what is the best way to log _all_ exceptions that are thrown in my  
Rails application into a database table? I need some kind of hook in  
the Rails exception methods?!

I already tried the Exception Logger plugin but that is not what I  
want.

I just want to log _all_ exceptions into a database table without  
needing to call own methods everywhere I expect an exception.

Thank you!  
Lennart

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 14, 2009, 2:47am UTC](https://www.ruby-forum.com/t/logging-all-exceptions/160180/2 "2009-02-14T02:47:25Z")

</div>

Maybe you could use callbacks?

On Feb 12, 10:53 am, “removed\_email\_address@domain.invalid”

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 14, 2009, 3:57am UTC](https://www.ruby-forum.com/t/logging-all-exceptions/160180/3 "2009-02-14T03:57:45Z")

</div>

On Thu, Feb 12, 2009 at 7:53 AM, removed\_email\_address@domain.invalid  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I just want to log _all_ exceptions into a database table without  
> needing to call own methods everywhere I expect an exception.
> 
> Thank you!  
> Lennart

Lennart,

You might consider using Exceptional for this.

- [http://getexceptional.com/](http://getexceptional.com/)

Save yourself the extra work…

Robby

–  
Robby R.  
Chief Evangelist, Partner

PLANET ARGON, LLC  
design // development // hosting w/Ruby on Rails

> **[Planet Argon](https://www.planetargon.com/)**
>
> Planet Argon is a Ruby on Rails development agency specializing in maintenance and support for existing Rails apps. Based in Portland, OR, Planet Argon has been a member of the Rails community since 2004.

[http://robbyonrails.com/](http://robbyonrails.com/)  
[http://twitter.com/planetargon](http://twitter.com/planetargon)  
aim: planetargon

+1 503 445 2457  
+1 877 55 ARGON [toll free]  
+1 815 642 4068 [fax]

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 14, 2009, 11:52am UTC](https://www.ruby-forum.com/t/logging-all-exceptions/160180/4 "2009-02-14T11:52:11Z")

</div>

On 14 Feb., 03:56, Robby R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> You might consider using Exceptional for this.
> 
> \*[http://getexceptional.com/](http://getexceptional.com/)

Thank you, Robby. The problem is that I want to build the database  
exception logging into the Rails web interface of a free software  
project. ([www.scopeport.org](http://www.scopeport.org))  
I don’t want to force users to subscribe to another service if they  
want help. (But Exceptional looks very cool. I might consider using it  
for other projects)

I will take a look at the callback thing. Thank you pepe.

So long  
Lennart
