make log function