Forum: Ruby on Rails Log question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Af95bdaf87958c40150b813e94381bfd?d=identicon&s=25 Christer Nilsson (christer)
on 2005-11-24 08:32
development.log  contains quite a few SELECTS on system tables like
COLUMNS. Wouldn't it be more efficient to cache this info?

I'm also wondering about strings like "". What's their purpose
and is it possible to get rid of them? They look like screen coordinates
and makes no sense in a text file.

Christer

Processing ReportController#create (for 127.0.0.1 at 2005-11-24
08:18:41) [POST]
  Parameters: {"action"=>"create", "controller"=>"report",
"report"=>{"flightnumber"=>"XYZ789", "id"=>"", "description"=>"CIA
flight...", "flightdate(1i)"=>"2005", "flightdate(2i)"=>"11",
"flightdate(3i)"=>"24"}}
  Report Columns (0.070000)   SELECT COLUMN_NAME as
ColName, COLUMN_DEFAULT as DefaultValue, DATA_TYPE as ColType,
COL_LENGTH('reports', COLUMN_NAME) as Length,
COLUMNPROPERTY(OBJECT_ID('reports'), COLUMN_NAME, 'IsIdentity') as
IsIdentity, NUMERIC_SCALE as Scale FROM INFORMATION_SCHEMA.COLUMNS WHERE
TABLE_NAME = 'reports'
  SQL (0.050000)   SELECT COLUMN_NAME as ColName,
COLUMN_DEFAULT as DefaultValue, DATA_TYPE as ColType, COL_LENGTH('',
COLUMN_NAME) as Length, COLUMNPROPERTY(OBJECT_ID(''), COLUMN_NAME,
'IsIdentity') as IsIdentity, NUMERIC_SCALE as Scale FROM
INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ''
  SQL (0.070000)   SELECT @@IDENTITY AS Ident
  Report Create (0.200000)   INSERT INTO reports
([flightdate], [flightnumber], [description], [user_id])
VALUES('2005-11-24 00:00:00', 'XYZ789', 'CIA flight...', 1)
Redirected to http://localhost:3000/report/list
Com
Ef4d1b20eba4b45b4a477c33bae1d156?d=identicon&s=25 ksibilev (Guest)
on 2005-11-24 09:30
(Received via mailing list)
Column info is cached when you run in the production mode.

" [4;35;1m" sequence is a ANSI colors that make it much easier to look
at the
log file. If you run Unix you can benefit from this. On Windows I prefer
to
disable this feature but adding

config.active_record.colorize_logging = false

to my environment.rb file.

Kent.
This topic is locked and can not be replied to.