Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
docs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
backend
docs
Commits
165828a3
Commit
165828a3
authored
Oct 15, 2015
by
柯阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add module and http verb field
parent
54c36b40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
log.md
log.md
+3
-1
No files found.
log.md
View file @
165828a3
...
@@ -20,7 +20,7 @@
...
@@ -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"}, "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
"}
## 日志字段
## 日志字段
...
@@ -32,10 +32,12 @@
...
@@ -32,10 +32,12 @@
* `LEVEL`: 日志等级。`DEBUG`, `INFO`, `WARNING`, `ERROR`等。
* `LEVEL`: 日志等级。`DEBUG`, `INFO`, `WARNING`, `ERROR`等。
* `LOGID`: trace用,暂时空缺,填空字符串。
* `LOGID`: trace用,暂时空缺,填空字符串。
* `TIME`: 日志记录时间。使用[ISO8601标准](https://en.wikipedia.org/wiki/ISO_8601),要求包含时区`+08:00`。根据需要决定是否精确到毫秒。完整例子如`2015-10-14T17:13:00+08:00`。
* `TIME`: 日志记录时间。使用[ISO8601标准](https://en.wikipedia.org/wiki/ISO_8601),要求包含时区`+08:00`。根据需要决定是否精确到毫秒。完整例子如`2015-10-14T17:13:00+08:00`。
* `MODULE`: 打印日志的模块。
2.
`SYS`
字段
2.
`SYS`
字段
`SYS`字段包含一些全局性的或系统级别的信息,只要有就必须打。包含以下子字段
`SYS`字段包含一些全局性的或系统级别的信息,只要有就必须打。包含以下子字段
* `http_verb`: 请求的HTTP VERB(`GET`/`POST`/`DELETE`)
* `action`: 请求的URL(去掉GET参数)。
* `action`: 请求的URL(去掉GET参数)。
* `cl_type`: 请求来源端类型,`ios`/`android`/`pc`/`m`。
* `cl_type`: 请求来源端类型,`ios`/`android`/`pc`/`m`。
* `cl_ver`: 客户端版本号,`pc`不需要填写,m站除了native内嵌h5外不需要填写。
* `cl_ver`: 客户端版本号,`pc`不需要填写,m站除了native内嵌h5外不需要填写。
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment