private function outputTaskStack() {
        foreach ($this->taskStack as $indent => &$task) {
            list($taskLevel, $taskMessage, $taskContext, $taskOutput) = $task;
            if (!$taskOutput) {
                $this->logInternal($taskLevel, $taskMessage, [self::FIELD_INDENT => $indent] + $taskContext);

                $task[3] = true; // mark task as outputted
            }
        }
    }