Trace Output Initially trace output is written to "STDERR". Both the "$h->trace" and "DBI->trace" methods take an optional $trace_filename parameter. If specified, and can be opened in append mode, then all trace output (currently including that from other handles) is redirected to that file. A warning is generated if the file can't be opened.