Skip to content
jrochkind edited this page Jan 5, 2012 · 14 revisions

Like a typical rails app, Umlaut logs to the ./logs directory, in development.log or production.log etc, depending on what environment you are running under.

Checking for Errors

Rails logger (or any ruby Logger) can log messages with different severity levels: FATAL, ERROR, WARN, INFO, DEBUG.

The default Rails production environment log includes INFO lines for every request. It also includes FATAL lines for any unexpected exceptions (bugs).

In addition, Umlaut will log ERROR or WARN for any service errors -- which could be caused by a third party service being down or returning an expected result, or could be caused by a bug in Umlaut's service plugin code.

Unfortunately, Rails by default does not actually include the severity of logged messages in it's log file, doh.

You can install the Rails gem jrochkind wrote, https://github.com/jrochkind/formatted_rails_logger, to have Rails log with severity.

Then you might want to periodically grep your log file for ERROR|WARN|FATAL to see if there are any problems going on you should know about.

(TODO: We could hypothetically write an admin interface which shows you any recent failed service executions, as failed services are also recorded in the database dispatched_services table (staying there until that table is purged by nightly_maintenance task). Is there interest? )

Turn off database logging in development

The database logging turned on in development is rather verbose. It's by default not present in a production environment, but sometimes you want to turn it off in development so you can examine the other logging, such as umlaut's own service logging.

Add this to an environment file, such as ./environments/development.rb

config.active_record.logger = nil
Clone this wiki locally