0
我希望包括我的自定義日誌中測井公司,我使用皮諾模塊測井公司, 這裏是日誌示例 這是在響應每一次當我打我的API如何使用nodejs包含我的自定義記錄器?
"1493118596934" "TRACE" "services-mc" "victoria-lap" "sr" "" "" "094ce63c-e067-4c4e-a441-92c247f0ed43" "" "GET" "/user/v1/favoritepets/?userId=123" "request received"
"1493118598480" "TRACE" "services-mc" "victoria-lap" "" "" "" "094ce63c-e067-4c4e-a441-92c247f0ed43" "" "GET" "/user/v1/favoritepets/?userId=123" ""
"1493118598490" "TRACE" "services-mc" "victoria-lap" "" "" "" "094ce63c-e067-4c4e-a441-92c247f0ed43" "" "GET" "/user/v1/favoritepets/?userId=123" ""
"1493118598494" "TRACE" "services-mc" "victoria-lap" "ss" "" "" "094ce63c-e067-4c4e-a441-92c247f0ed43" "200" "GET" "https://stackoverflow.com/users/v1/favoritepets/?userId=123" "response sent"
這裏我包括我的自定義日誌這樣
"1493118596934" "TRACE" "services-mc" "victoria-lap" "sr" "" "" "094ce63c-e067-4c4e-a441-92c247f0ed43" "" "GET" "/user/v1/favoritepets/?userId=123" "request received"
*"pet_hit_journal" "15829507" "2017-03-10" "741184567" "" "web"*
"1493118598480" "TRACE" "services-mc" "victoria-lap" "" "" "" "094ce63c-e067-4c4e-a441-92c247f0ed43" "" "GET" "/user/v1/favoritepets/?userId=123" ""
"1493118598490" "TRACE" "services-mc" "victoria-lap" "" "" "" "094ce63c-e067-4c4e-a441-92c247f0ed43" "" "GET" "/user/v1/favoritepets/?userId=123" ""
"1493118598494" "TRACE" "services-mc" "victoria-lap" "ss" "" "" "094ce63c-e067-4c4e-a441-92c247f0ed43" "200" "GET" "https://stackoverflow.com/users/v1/favoritepets/?userId=123" "**response sent**"
注: 自定義日誌信息,知道什麼時候我使用的是特定的控制器,該數據是從數據庫中提取。 應該有可能嗎?任何想法,請...