Bug 998210 - check whether logging is enabled before calling PR_LOG. r=mkato