Commit d00e9ef8 authored by 郑伟's avatar 郑伟

Merge branch 'master' of git.gengmei.cc:backend/docs

parents 665b4ca5 b10c5f33
......@@ -20,7 +20,7 @@
## 日志示例
{"SYS": {"action": "/api/topic/create", "log_host": "10.127.158.29", "cl_id": "861342028123987123", "session_id": "cx123nfglxkdzlfjadwrsdnvsd34z", "cl_type": "ios", "cl_ver": "5.2.1", "channel": "mingxingyichu"}, "LEVEL": "INFO", "APP": {"minami": "kotori", "hello": "world"}, "TIMER": {"total": 123.456, "get_user_from_context": 78.9}, "LOGID": "", "TIME": "2015-10-14T17:13:20+08:00"}
{"SYS": {"http_verb":"POST", "action": "/api/topic/create", "log_host": "10.127.158.29", "cl_id": "861342028123987123", "session_id": "cx123nfglxkdzlfjadwrsdnvsd34z", "cl_type": "ios", "cl_ver": "5.2.1", "channel": "mingxingyichu", "user_ip":"106.187.42.233"}, "LEVEL": "INFO", "APP": {"minami": "kotori", "hello": "world"}, "TIMER": {"total": 123.456, "get_user_from_context": 78.9}, "LOGID": "", "TIME": "2015-10-14T17:13:20+08:00", "MODULE":"gaia"}
## 日志字段
......@@ -45,10 +45,12 @@
* `LOGID`: trace用,暂时空缺,填空字符串。
* `TIME`: 日志记录时间。使用[ISO8601标准](https://en.wikipedia.org/wiki/ISO_8601),要求包含时区`+08:00`。根据需要决定是否精确到毫秒。完整例子如`2015-10-14T17:13:00+08:00`。
* `MODULE`: 打印日志的模块。
2. `SYS`字段
`SYS`字段包含一些全局性的或系统级别的信息,只要有就必须打。包含以下子字段
* `http_verb`: 请求的HTTP VERB(`GET`/`POST`/`DELETE`)
* `action`: 请求的URL(去掉GET参数)。
* `cl_type`: 请求来源端类型,`ios`/`android`/`pc`/`m`。
* `cl_ver`: 客户端版本号,`pc`不需要填写,m站除了native内嵌h5外不需要填写。
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment