[Catalyst] How to show SQL in apache error_log?
jjn1056 at yahoo.com
Tue Jun 12 14:41:57 GMT 2007
--- Cookie <xiaoquqi at gmail.com> wrote:
> It seems useless.The apache error_log still don't
> output the sql.
> Thanks for your reponse.
> Date: Mon, 11 Jun 2007 09:41:04 +0300
> From: "Octavian Rasnita" <orasnita at gmail.com>
> Subject: Re: [Catalyst] How to show SQL in apache
> To: "The elegant MVC web framework"
> <catalyst at lists.rawmode.org>
> <001f01c7abf3$80f5bf20$251c320a at octavian>
> Content-Type: text/plain; charset="iso-8859-1"
> You can put
> in MyApp.pm
> ----- Original Message ----- =
> From: Cookie =
> To: catalyst at lists.rawmode.org =
> Sent: Monday, June 11, 2007 7:01 AM
> Subject: [Catalyst] How to show SQL in apache
> As we know,if we use export DBIC_TRACE=3D1 and then
> we run the myapp_serv=
> er.pl,we can see the sql from the stander output.
> I want to show the sql in the apache error_log.I
> modify the httpd.conf fi=
> le like this:
> setenv DBIC_TRACE 1
> But it seems useless.How can solve this problem?
If you are using DBIx::Class, you can enable debugging
mode, which output the SQL generated. Also you can
enable DBI trace levels like so:
Where $x is range 1..15. See:
For more. Don't make the number too big or your logs
I guess this all goes to STDOUT, but not sure what
Apache will do with that. I don't have a lot of
experience with it because I usually log to a database
with log4perl for my webapps. But give it a try. You
might have to tweak the apache log configuration. If
you are running the app in a virtual host you can
create a custom log handler just for it, so it's not
mixed up with your other hosts.
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.
More information about the Catalyst