This came up tangentially in another thread, but I''m still curious. It looks like the log files that rails generates are ANSI-escaped for colorization purposes. As I am on a Windows system, getting this to work is an extremely ugly hack (which involves command.com and ANSI.SYS -- ''member those?). Any idea how these log files can be viewed easily on a Windows 2k/XP system? The googling I have done yieled sparse results, mostly DOS-only programs to view ANSI art. I guess the next logical question would be, if this is not an easy thing to do, what configuration change should be made to turn ANSI- escaping off? Thanks!
My very first post to the RoR list! On May 24, 2005, at 2:28 PM, Lester Bangs wrote:> This came up tangentially in another thread, but I''m still curious. > It looks > like the log files that rails generates are ANSI-escaped for > colorization > purposes. As I am on a Windows system, getting this to work is an > extremely > ugly hack (which involves command.com and ANSI.SYS -- ''member those?). > > Any idea how these log files can be viewed easily on a Windows 2k/ > XP system? > The googling I have done yieled sparse results, mostly DOS-only > programs to > view ANSI art. I guess the next logical question would be, if this > is not an > easy thing to do, what configuration change should be made to turn > ANSI- > escaping off?I just had this same desire and the solution is to add this line to config/environment.rb: ActiveRecord::Base.colorize_logging = false Erik
Lester Bangs wrote:>The googling I have done yieled sparse results, mostly DOS-only programs to >view ANSI art. I guess the next logical question would be, if this is not an >easy thing to do, what configuration change should be made to turn ANSI- >escaping off? > >ActiveRecord::Base.colorize_logging = false Just stick this in the application.rb so that it is called for each action. - Adam PS. Alternatively, you can change the default from true to false in the rails source. That''s at least what was done for the rails package in Debian.
Interestingly, on my XP boxen, the colorizations work "out of the box"; at least with cygwin less and tail... But, what Erik said in order to fix it. On 5/24/05, Erik Hatcher <erik-LIifS8st6VgJvtFkdXX2HpqQE7yCjDx5@public.gmane.org> wrote:> My very first post to the RoR list! > > On May 24, 2005, at 2:28 PM, Lester Bangs wrote: > > This came up tangentially in another thread, but I''m still curious. > > It looks > > like the log files that rails generates are ANSI-escaped for > > colorization > > purposes. As I am on a Windows system, getting this to work is an > > extremely > > ugly hack (which involves command.com and ANSI.SYS -- ''member those?). > > > > Any idea how these log files can be viewed easily on a Windows 2k/ > > XP system? > > The googling I have done yieled sparse results, mostly DOS-only > > programs to > > view ANSI art. I guess the next logical question would be, if this > > is not an > > easy thing to do, what configuration change should be made to turn > > ANSI- > > escaping off? > > I just had this same desire and the solution is to add this line to > config/environment.rb: > > ActiveRecord::Base.colorize_logging = false > > Erik > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Lester Bangs wrote:>This came up tangentially in another thread, but I''m still curious. It looks >like the log files that rails generates are ANSI-escaped for colorization >purposes. As I am on a Windows system, getting this to work is an extremely >ugly hack (which involves command.com and ANSI.SYS -- ''member those?). > >Any idea how these log files can be viewed easily on a Windows 2k/XP system? >The googling I have done yieled sparse results, mostly DOS-only programs to >view ANSI art. I guess the next logical question would be, if this is not an >easy thing to do, what configuration change should be made to turn ANSI- >escaping off? > >Thanks! > >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > > > >For details of this nasty hack see http://is-it-true.org/nt/utips/utips181.shtml -- Mike Gilbert email : mike-jLbnyU+aYbUAvxtiuMwx3w@public.gmane.org Technical Director fax : +353 68 470 01 XL CRS mobile: +353 87 677 2055 Lisselton phone : +353 68 470 10 Listowel Co. Kerry MSM : mikegilbert-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org Ireland Y!M : mike_j_gilbert-/E1597aS9LQAvxtiuMwx3w@public.gmane.org