Refactored codes to identify log value. Refs #10028.