updated log method