logging sort