You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Scott Chapman <sc...@mischko.com> on 2002/05/14 19:53:16 UTC

How to get DBIx::RecordSet SQL statements logged?

How do I get the resulting SQL statement built by DBIx::Recordset to be 
logged somewhere so I can see it?



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: How to get DBIx::RecordSet SQL statements logged?

Posted by Kee Hinckley <na...@somewhere.com>.
At 10:53 AM -0700 5/14/02, Scott Chapman wrote:
>How do I get the resulting SQL statement built by DBIx::Recordset to be
>logged somewhere so I can see it?

$DBIx::Recordset::Debug = 2;

or

set Debug when you open the database.
E.g.

         new DBIx::Database({
                 '!DataSource' => $connect,
                 '!DBIAttr' => {RaiseError => 1, AutoCommit => 1},
                 '!Username' => $this->{username},
                 '!Password' => $this->{password},
                 '!KeepOpen' => 1,
                 '!Debug'        => 2,
                 '!SaveAs' => 'Articles',
             }) || die $DBI::errstr;

If you are using embperl it will be logged to the embperl log
  	tail -f /tmp/embperl.log | egrep DB:
gets them.

Otherwise I forget where it's logged, but it's documented in DBIx::Recordset
-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org