As mentioned above, you should use Apache::Log if running under mod_perl. However, if what you're after is just a way to configure debugging from httpd.conf, you could simply set an environment variable right next to the line where you set LogLevel, and check that variable in your program when you print debugging info.