Adjusting log function