Getting logging level in run-time

Hi

I have to check logging level (verbose,info,etc) in run-time. Based on this I’have to include/exclude some functionality. Is there any env. variable, function to obtain such information ?