2006年12月30日(土) [過去の今日]
#1 DBIx::Classで生成されたSQLをロギングする方法
というのが Drk7jpの記事 に載ってて、「おーすげーな」とか思ってたのだが、よく見たらDBIx::Class::Manual::Troubleshootingにロギング方法載ってた。
Tracing SQL The "DBIC_TRACE" environment variable controls SQL tracing, so to see what is happening try export DBIC_TRACE=1 Alternatively use the "storage->debug" class method:- $class->storage->debug(1); To send the output somewhere else set debugfh:- $class->storage->debugfh(IO::File->new('/tmp/trace.out', 'w'); Alternatively you can do this with the environment variable too:- export DBIC_TRACE="1=/tmp/trace.out"
環境変数使うのねん。
しかし、コメントしようとしたら404帰ってきてコメントできなかった。spam避けにでもひっかかってんのかな。トラックバックは送れないしなあ……。
(@235)