# Enabling tracing

- ## Per handle

  $h->trace($level);
  $h->trace($level, $filename);
- Only effects that handle and any new child handles created from it
- Child handles get trace level of parent in effect at time of creation

- ## Global (internal to application)

  DBI->trace(...);
- Sets effective global default minimum trace level

- ## Global (external to application)

  - Enabled using DBI_TRACE environment variable
    DBI_TRACE=digits DBI->trace(digits);
    DBI_TRACE=filename DBI->trace(2, filename);
    DBI_TRACE=digits=filename DBI->trace(digits, filename);

Previous slide | Next slide | Back to first slide | View graphic version