Added more checks to CommonLogger and fixed LogPriority.