public static function addData($data, $key = NULL)
    {
        $currentPointer = end(self::$currentPointerStack);
        if (!isset(self::$stackLog[$currentPointer]['messages'])) {
            self::$stackLog[$currentPointer]['messages'] = array();
        }
        if (is_null($key)) {
            self::$stackLog[$currentPointer]['messages'][] = $data;
        } else {
            self::$stackLog[$currentPointer]['messages'][$key] = $data;
        }
    }