Handling logs table sort