When I open up my Rails .log files in TextMate, I see some kind of coding (e.g. [4;36;1mSQL ) in the log. I assume this is for color coding or something of the text. How can I get TextMate to render it correctly? Thanks, Tom --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Tom wrote:> When I open up my Rails .log files in TextMate, I see some kind of > coding (e.g. [4;36;1mSQL ) in the log. I assume this is for color > coding or something of the text. How can I get TextMate to render it > correctly? > > Thanks, > TomOpen up a console and type this instead... tail -f log/development.log --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
_Kevin wrote:> Tom wrote: >> When I open up my Rails .log files in TextMate, I see some kind of >> coding (e.g. [4;36;1mSQL ) in the log. I assume this is for color >> coding or something of the text. How can I get TextMate to render it >> correctly? >> >> Thanks, >> Tom > > Open up a console and type this instead... > > tail -f log/development.log...which doesn''t really answer the question :-) Not that I can, I have to say, just that trying to open it in an editor is something you might do because viewing it in a console isn''t rich enough. So how to open a log file in TextMate ? The codes are just ANSI colour coding for display in a colour xterm. It *should* be possible to have a doctype for TextMate that will open them correctly. The problem is, of course, that while they are display info, they are also textual content, and TextMate would be getting dangerous if it started stripping characters out of the file for display purposes...what would it do if you made a change and then saved ? A better bet might be to find a way to strip them out and produce a ''clean'' log file. Alternatively, set ActiveRecord::Base.colorize_logging to false in your environment and rerun whatever you were trying to do ? Alan -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Alan, Thanks for the explanation! The ActiveRecord::Base.colorize_logging will do exactly what I need! Thanks again, Tom --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You can also do "less -r log/development.log" to view the entire file later with colorization, assuming you have an ANSI type terminal program (as most are now days). David _Kevin wrote:> > > Tom wrote: >> When I open up my Rails .log files in TextMate, I see some kind of >> coding (e.g. [4;36;1mSQL ) in the log. I assume this is for color >> coding or something of the text. How can I get TextMate to render it >> correctly? >> >> Thanks, >> Tom > > Open up a console and type this instead... > > tail -f log/development.log > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---