use Apache::Log (); my $rlog = $r->log; $rlog->debug("You only see this if `LogLevel' is set to `debug'");