跳到主要内容
跳到主要内容

Log Action

Request

GET /rest/v1/log

Description

GET 用于获取 Doris 最新的一部分 WARNING 日志,POST 方法用于动态设置 FE 的日志级别。

Path parameters

Query parameters

  • add_verbose

    POST 方法可选参数。开启指定 Package 的 DEBUG 级别日志。

  • del_verbose

    POST 方法可选参数。关闭指定 Package 的 DEBUG 级别日志。

Request body

Response

GET /rest/v1/log

{
"msg": "success",
"code": 0,
"data": {
"LogContents": {
"logPath": "/home/disk1/cmy/git/doris/core-for-ui/output/fe/log/fe.warn.log",
"log": "<pre>2020-08-26 15:54:30,081 WARN (UNKNOWN 10.81.85.89_9213_1597652404352(-1)|1) [Catalog.notifyNewFETypeTransfer():2356] notify new FE type transfer: UNKNOWN</br>2020-08-26 15:54:32,089 WARN (RepNode 10.81.85.89_9213_1597652404352(-1)|61) [Catalog.notifyNewFETypeTransfer():2356] notify new FE type transfer: MASTER</br>2020-08-26 15:54:35,121 WARN (stateListener|73) [Catalog.replayJournal():2510] replay journal cost too much time: 2975 replayedJournalId: 232383</br>2020-08-26 15:54:48,117 WARN (leaderCheckpointer|75) [Catalog.replayJournal():2510] replay journal cost too much time: 2812 replayedJournalId: 232383</br></pre>",
"showingLast": "603 bytes of log"
},
"LogConfiguration": {
"VerboseNames": "org",
"AuditNames": "slow_query,query",
"Level": "INFO"
}
},
"count": 0
}

其中 data.LogContents.log 表示最新一部分 fe.warn.log 中的日志内容。

POST /rest/v1/log?add_verbose=org

{
"msg": "success",
"code": 0,
"data": {
"LogConfiguration": {
"VerboseNames": "org",
"AuditNames": "slow_query,query",
"Level": "INFO"
}
},
"count": 0
}