My apologies in advance if this question has already been answered. I have been attempting to search for this on Google and StackOverflow both, but since my search query has punctuation in it, search engines tend to munge it and give me nonsense results.

In my rails application (rails 3.2.11, ruby 1.9.3), my logs frequently look like this:

Started GET "/apply/contact" for 127.0.0.1 at 2013-01-29 17:35:21 -0600
Processing by JobApplicationsController#show as HTML
  Parameters: {"id"=>"contact"}
  [1m[36mJobApplication Load (0.5ms)[0m  [1mSELECT "job_applications".* FROM "job_applications" WHERE "job_applications"."id" = 9 LIMIT 1[0m
  [1m[35mPerson Load (0.4ms)[0m  SELECT "people".* FROM "people" WHERE "people"."id" = 42 LIMIT 1
  Rendered job_applications/contact.html.haml within layouts/bare (9.6ms)
  Rendered shared/_messages.html.haml (0.1ms)
Completed 200 OK in 88ms (Views: 24.8ms | ActiveRecord: 0.9ms | Solr: 0.0ms)

What I am wondering is in regards to the [1m[36m and [1m[35m tokens, which appear before some of the lines, and also the [0m and [1m that sometimes appear within the line.

The only numbers that ever show up are 0, 1, 32, 35, and 36. These tokens are always preceded in the log file by an unprintable escape character.

What are these numbers indicating? Why are they showing up in my logs? And is there a way to get rid of them? They (and their escape-character friends) are exceedingly annoying when attempting to read through the logs and diagnose an issue.

Edit
Report