ruby-on-railsrubyloggingherokulogentries

Rails.logger.error not being identified as error by Logentries addon


I'm using Rails.logger.error to log my errors. I'm trying to view them in my logs and in heroku's logentries addon byt I see they are logged as simple text. No indication that this is in fact an error and Logentries isn't picking it up as an error either.

Any idea why this is? How should I be logging my errors for easy finding later?

Thanks! Uri


Solution

  • In order for an entry to be tagged as an Error in Logentries, you need to create an Alert under "Tags & Alerts". Here's one that I've created for Mysql2::Error:

    Configuring an Alert
    (source: infused.org)

    Here's how it is configured (note that the label is set to "Error"):

    Configuring an Alert2
    (source: infused.org)

    Read through the documentation for Tags & Alerts for more info.