Log Action

Request

  1. GET /rest/v1/log

Description

GET is used to obtain the latest part of Doris’s WARNING log, and the POST method is used to dynamically set the log level of FE.

Path parameters

None

Query parameters

  • add_verbose

    Optional parameters for the POST method. Enable the DEBUG level log of the specified package.

  • del_verbose

    Optional parameters for the POST method. Turn off the DEBUG level log of the specified package.

Request body

None

Response

  1. GET /rest/v1/log
  2. {
  3. "msg": "success",
  4. "code": 0,
  5. "data": {
  6. "LogContents": {
  7. "logPath": "/home/disk1/cmy/git/doris/core-for-ui/output/fe/log/fe.warn.log",
  8. "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>",
  9. "showingLast": "603 bytes of log"
  10. },
  11. "LogConfiguration": {
  12. "VerboseNames": "org",
  13. "AuditNames": "slow_query,query",
  14. "Level": "INFO"
  15. }
  16. },
  17. "count": 0
  18. }

Among them, data.LogContents.log means the log content in the latest part of fe.warn.log.

  1. POST /rest/v1/log?add_verbose=org
  2. {
  3. "msg": "success",
  4. "code": 0,
  5. "data": {
  6. "LogConfiguration": {
  7. "VerboseNames": "org",
  8. "AuditNames": "slow_query,query",
  9. "Level": "INFO"
  10. }
  11. },
  12. "count": 0
  13. }