used log method to log message