|
From: Michael N. <uu...@rz...> - 2003-01-20 12:04:29
|
Paul DuBois wrote:
> I am assuming that DBI.trace can be used to set the global trace
> level for a script, but it appears not to be doing what I expect.
>
> For example, in the DBI distribution, examples/trace_test.rb begins like
> this:
>
> require "dbi"
> require "dbi/trace"
>
> DBI.trace(0)
>
> dbh = DBI.connect('dbi:Mysql:database=test')
>
>
> However, when I run the script, I get trace output from the connect
> call, even though the global level is set to 0. (The DBI docs don't
> specify so, but I assume 0 = "off".) Output is:
0 = No Tracing at all.
> % ruby trace_test.rb
> -> connect for #<DBI::DriverHandle:0x184148> ("database=test", nil, nil,
> nil)
> !! Access denied for user: 'paul@localhost' (Using password: NO)
> <- connect for #<DBI::DriverHandle:0x184148>
> /usr/lib/ruby/site_ruby/1.6/DBD/Mysql/Mysql.rb:66:in `connect':
> Access denied for user: 'paul@localhost' (Using password: NO)
> (DBI::DatabaseError)
> from /usr/lib/ruby/site_ruby/1.6/dbi/dbi.rb:550:in `connect'
> from (eval):8:in `connect'
> from /usr/lib/ruby/site_ruby/1.6/dbi/dbi.rb:367:in `connect'
> from trace_test.rb:6
>
I get the following:
/usr/local/lib/ruby/site_ruby/1.6/DBD/Mysql/Mysql.rb:66:in `connect': Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) (DBI::DatabaseError)
from /usr/local/lib/ruby/site_ruby/1.6/dbi/dbi.rb:550:in `connect'
from (eval):8:in `connect'
from /usr/local/lib/ruby/site_ruby/1.6/dbi/dbi.rb:367:in `connect'
from trace_test.rb:6
Which version of AspectR are you using? Try the newest (0.3.5).
Regards,
Michael
|