"ESC" Character in test.log when viewed in Sublime

These are control characters used to add colour to the log files. Sublime text apparently doesn't support this.

If you're mostly going to be viewing log files with editors that don't understand these colour codes you can turn this off with the rails config.colorize_logging setting


There's a Sublime package to turn these ANSI/vt100 escape sequences into colored text -- SublimeANSI (use Package Control and look for ANSIescape) -- this adds an "ANSI" file type that will display your log file in glorious color. (The file is displayed read-only but you can change the type back to "Plain Text" if you want to edit it.)


Backing up Tom Hundt's answer... SublimeANSI is the way to go. Compare these before/after shots:

Sublime's default rendering of colorized Rails log output:

Sublime's default rendering of colorized Rails log output

Now change the syntax highlighting to ANSI:

Now change the syntax highlighting to ANSI

Now, marvel in the majesty of SumblimeANSI's rendering:

enter image description here

Learn more about SublimeANSI package at: https://github.com/aziz/SublimeANSI

Note: To install it in Package Manager, search for "ANSIescape" ... NOT "SublimeANSI". This confused me for a hot minute.