refactor log depth