Loggers¶
The loggers enable setting a log level per logger. The loggers are the name of the log element in the project. The log level influences the amount of information on a log. The log level can be debug, info, warning, error, fatal or panic.
-
GET
/log/defaults
¶ Get the default loggers configuration
Response JSON Object: - [key] (string) – The logger level
Example response:
{ "leaf": "info" }
-
POST
/log/defaults/{loggerID}
¶ Update the default logger
Parameters: - loggerID – The logger ID
Request JSON Object: - [key] (string) – The logger level
Example query:
{ "leaf": "info" }
-
GET
/log/allocs/{allocID}
¶ Get the current allocation loggers configuration. An empty value means that the allocation is using the default value. An allocation is an instance of a task.
Parameters: - allocID – The allocation ID
Response JSON Object: - [key] (string) – The logger level
Example response:
{ "leaf": "info" }
-
POST
/log/allocs/{allocID}/{loggerID}
¶ Set an allocation loggers configuration
Parameters: - allocID – The allocation ID
- loggerID – The logger ID
Request JSON Object: - [key] (string) – The logger level
Response JSON Object: - [key] (string) – The logger level
Example query:
{ "leaf": "info" }
Example response:
{ "leaf": "info" }
Logs¶
-
GET
/log/logs
¶ Get the logs
Response JSON Object: - [] (object) –
- [].id (string) – The log id
- [].fileName (string) – The file name. Ex: stderr, stdout
- [].group (string) – The log group
- [].job (string) – The log job
- [].logLevel (string) – The log level
- [].task (string) – The task
Example response:
[ { "id": "logID", "fileName": "stderr", "group": "group", "job": "jobName", "logLevel": "info", "task": "taskName" } ]
-
POST
/log/logs
¶ Set the logs
Request JSON Object: - [] (object) –
- [].id (string) – The log id
- [].fileName (string) – The file name. Ex: stderr, stdout
- [].group (string) – The log group
- [].job (string) – The log job
- [].logLevel (string) – The log level
- [].task (string) – The task
Example query:
[ { "id": "logID", "fileName": "stderr", "group": "group", "job": "jobName", "logLevel": "info", "task": "taskName" } ]
-
GET
/log/meta/{name}
¶ Get the logs metadata
Parameters: - name – undefined
Response JSON Object: - [] (object) –
- [].allocID (string) – The log allocation ID
- [].status (string) – The task status
- [].logLevel (boolean) – If the process supports log level or not
- [].jobName (string) – The job name
- [].taskName (string) – The task name
- [].fileName (string) – The file name
- [].createTime (string) – The creation time of the log
Example response:
[ { "allocID": "allodID", "status": "running", "logLevel": false, "jobName": "jobName", "taskName": "taskName", "fileName": "fileName", "createTime": "" } ]
-
GET
/log/fs/{alloc}/{task}/{fs}
¶ Get the log data
Parameters: - alloc – The allocation ID
- task – The task ID
- fs – The file system id. Either stdout or stderr
Query Parameters: - origin – The origin of the log. start or end
- offset – The offset from the origin
Response JSON Object: - Offset (integer) – The offset from the origin
- Data (string) – The log data
- File (string) – The file
- FileEvent (string) –
Example response:
{ "Offset": 0, "Data": "logData" }