This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 101480 - ActiveRecord logging color codes clutters the output
Summary: ActiveRecord logging color codes clutters the output
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-17 23:01 UTC by pmenglund
Modified: 2007-09-05 04:44 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pmenglund 2007-04-17 23:01:49 UTC
If you start your RoR project with mongrel, the escape sequences makes it hard to read the output:

=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
  [4;36;1mSQL (0.000210)[0m   [0;1mSET SQL_AUTO_IS_NULL=0[0m
  [4;35;1mSQL (0.000368)[0m   [0mselect count(*) from extension_meta[0m
  [4;36;1mRadiant::ExtensionMeta Columns (0.001849)[0m   [0;1mSHOW FIELDS FROM extension_meta
[0m
  [4;35;1mRadiant::ExtensionMeta Load (0.000303)[0m   [0mSELECT * FROM extension_meta WHERE 
(extension_meta.`name` = 'Markdown Filter') LIMIT 1[0m
Comment 1 Torbjorn Norbye 2007-04-17 23:16:16 UTC
I don't get that when I'm running mongrel.  I wonder if you have an environment variable set which causes 
mongrel to emit extra color codes. Is either LSCOLORS or CLICOLOR set in your environment? If I can find 
out what it is Mongrel is looking for, I can unset it before launching Mongrel in our IDE terminal, since it 
doesn't support color codes.
Comment 2 Torbjorn Norbye 2007-04-18 17:09:56 UTC
Marco Walther told me that the way to enable/disable colorized logging is to modify config/
environment.rb in the right place to set:

config.active_record.colorize_logging = false

I'll look into seeing if I can find a way to automatically get this setting set when launching the servers 
within the IDE, but this might be a workaround for you.
Comment 3 pmenglund 2007-04-18 18:11:47 UTC
yes, it is a usable workaround, but it would be nice if it either would be done automagically or if the 
output is colorized as intended
Comment 4 pmenglund 2007-04-18 18:12:01 UTC
yes, it is a usable workaround, but it would be nice if it either would be done automagically or if the 
output is colorized as intended
Comment 5 Jiri Kovalsky 2007-07-03 13:59:16 UTC
Reassigning this issue to newly created 'ruby' component.
Comment 6 Torbjorn Norbye 2007-09-05 04:44:31 UTC
This should be fixed now as of build 3667. I'm removing color codes from the output. (There's a separate issue tracking
the ability to actually have colored output in the output terminal; when that's supported it will be relatively easy to
support the color escape sequences).

IDE:-------------------------------------------------
IDE: [9/4/07 8:41 PM] Committing started
Checking in RailsServer.java;
/cvs/ruby/railsprojects/src/org/netbeans/modules/ruby/railsprojects/server/RailsServer.java,v  <--  RailsServer.java
new revision: 1.8; previous revision: 1.7
done
IDE: [9/4/07 8:41 PM] Committing finished