{"action":"created","issue":{"url":"https://api.github.com/repos/top-think/framework/issues/13","repository_url":"https://api.github.com/repos/top-think/framework","labels_url":"https://api.github.com/repos/top-think/framework/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/top-think/framework/issues/13/comments","events_url":"https://api.github.com/repos/top-think/framework/issues/13/events","html_url":"https://github.com/top-think/framework/pull/13","id":145960056,"number":13,"title":"Log::record($log, 'error');  // 记录的错误，但是未保存  导致出现错误 无法跟踪","user":{"login":"yovei","id":11456953,"avatar_url":"https://avatars.githubusercontent.com/u/11456953?v=3","gravatar_id":"","url":"https://api.github.com/users/yovei","html_url":"https://github.com/yovei","followers_url":"https://api.github.com/users/yovei/followers","following_url":"https://api.github.com/users/yovei/following{/other_user}","gists_url":"https://api.github.com/users/yovei/gists{/gist_id}","starred_url":"https://api.github.com/users/yovei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yovei/subscriptions","organizations_url":"https://api.github.com/users/yovei/orgs","repos_url":"https://api.github.com/users/yovei/repos","events_url":"https://api.github.com/users/yovei/events{/privacy}","received_events_url":"https://api.github.com/users/yovei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-05T11:22:51Z","updated_at":"2016-04-06T02:55:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/top-think/framework/pulls/13","html_url":"https://github.com/top-think/framework/pull/13","diff_url":"https://github.com/top-think/framework/pull/13.diff","patch_url":"https://github.com/top-think/framework/pull/13.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/top-think/framework/issues/comments/206094025","html_url":"https://github.com/top-think/framework/pull/13#issuecomment-206094025","issue_url":"https://api.github.com/repos/top-think/framework/issues/13","id":206094025,"user":{"login":"yovei","id":11456953,"avatar_url":"https://avatars.githubusercontent.com/u/11456953?v=3","gravatar_id":"","url":"https://api.github.com/users/yovei","html_url":"https://github.com/yovei","followers_url":"https://api.github.com/users/yovei/followers","following_url":"https://api.github.com/users/yovei/following{/other_user}","gists_url":"https://api.github.com/users/yovei/gists{/gist_id}","starred_url":"https://api.github.com/users/yovei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yovei/subscriptions","organizations_url":"https://api.github.com/users/yovei/orgs","repos_url":"https://api.github.com/users/yovei/repos","events_url":"https://api.github.com/users/yovei/events{/privacy}","received_events_url":"https://api.github.com/users/yovei/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T02:55:38Z","updated_at":"2016-04-06T02:55:38Z","body":"public static function appShutdown()\r\n    {\r\n        // 写入日志\r\n        Log::save();\r\n\r\n        if ($error = error_get_last()) {\r\n            // 将错误信息托管至think\\ErrorException\r\n            $exception = new ErrorException(\r\n                $error['type'],\r\n                $error['message'],\r\n                $error['file'],\r\n                $error['line']\r\n            );\r\n\r\n            /**\r\n             * Shutdown handler 中的异常将不被往下传播\r\n             * 所以，这里我们必须手动传播而不能像 Error handler 中那样 throw\r\n             */\r\n            self::appException($exception);\r\n            // 禁止往下传播已处理过的异常\r\n            return true;\r\n        }\r\n        return false;\r\n    }\r\n\r\n\r\n\r\n错误输出在 appException  \r\n\r\n所以  Log::save() 保存之后  再执行 appException     record 之后没有再save了"}}