my $db = DBI->connect(#blah blah blah"); # trace level (1-9), and output (STDERR if not specified) $db->trace(2, '/tmp/trace.log');