Fix debug logging, similar to r148519.

Reviewed by: Peter Gal