Fixed the logging function

Signed-off-by: Graham Chiu <compkarori@gmail.com>