Added support for conditionally compiled trace logging