Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minimum log_level parameter for GET /../logs #485 #488

Merged
merged 1 commit into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Recommendation to add a link with relation type `canonical` which points to a signed URL with the same content as the response. [#397](https://github.com/Open-EO/openeo-api/issues/397)
- Added metadata field `openeo:status` to indicate the job status (and whether the result is complete or not).
- Added parameter `partial` to allow retrieving incomplete results, which must also add the new property `openeo:status` to the metadata. [#430](https://github.com/Open-EO/openeo-api/issues/430)
- `GET /jobs/{job_id}/logs`, `GET /services/{service_id}/logs` and `POST /result`: Added `log_level` property in responses to reflect the minimum log level that has been chosen by the user. [#329](https://github.com/Open-EO/openeo-api/issues/329)
- `GET /jobs/{job_id}/logs`, `GET /services/{service_id}/logs`: Added `level` parameter to requests to set the minimum log level returned by the response. [#485](https://github.com/Open-EO/openeo-api/issues/485)
- Added property `log_level` to secondary web service, batch job and synchronous processing endpoints to indicate the minimum severity level that should be stored for logs. [#329](https://github.com/Open-EO/openeo-api/issues/329)
- `GET /jobs/{job_id}/logs`, `GET /services/{service_id}/logs` and `POST /result`: Added `level` property in responses to reflect the minimum log level that may appear in the response. [#329](https://github.com/Open-EO/openeo-api/issues/329)
- Recommendation to add media types and titles to links for a better user experience.
- Allow the relation type `canonical` to be used generally for (shared) resources (e.g. UDPs or batch jobs) without requiring Bearer authentication. [#405](https://github.com/Open-EO/openeo-api/issues/405)
- Recommendation for UDF runtime names. [#409](https://github.com/Open-EO/openeo-api/issues/409)
Expand Down
32 changes: 28 additions & 4 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2798,6 +2798,7 @@ paths:
parameters:
- $ref: '#/components/parameters/service_id'
- $ref: '#/components/parameters/log_offset'
- $ref: '#/components/parameters/log_level'
- $ref: '#/components/parameters/pagination_limit'
responses:
'200':
Expand Down Expand Up @@ -3105,6 +3106,7 @@ paths:
parameters:
- $ref: '#/components/parameters/job_id'
- $ref: '#/components/parameters/log_offset'
- $ref: '#/components/parameters/log_level'
- $ref: '#/components/parameters/pagination_limit'
responses:
'200':
Expand Down Expand Up @@ -6379,11 +6381,13 @@ components:
- logs
- links
properties:
log_level:
level:
description: |-
The minimum severity level for log entries that the back-end returns.
This property MUST reflect the `log_level` that has been specified by the user
for the processing request.
This property MUST reflect the effective lowest `level` that may appear in the document,
which is (if implemented) the highest level of:
1. the `log_level` specified by the user for the processing request.
2. the `level` specified by the user for the log request.

The order of the levels is as follows (from low to high severity): `debug`, `info`, `warning`, `error`.
That means if `warning` is set, the logs will only contain entries with the level `warning` and `error`.
Expand Down Expand Up @@ -6492,9 +6496,29 @@ components:
description: The last identifier (property `id` of a log entry) the client has received. If provided, the back-ends only sends the entries that occurred after the specified identifier. If not provided or empty, start with the first entry.
in: query
allowEmptyValue: true
example: "log1234"
example: log1234
schema:
type: string
log_level:
name: level
description: |-
The minimum severity level for log entries that the back-end returns.

The order of the levels is as follows (from low to high severity): `debug`, `info`, `warning`, `error`.
That means if `warning` is set, the back-end will only return log entries with the level `warning` and `error`.

The default minimum log level is `debug`, which returns all log levels.
in: query
allowEmptyValue: true
example: error
schema:
type: string
enum:
- error
- warning
- info
- debug
default: info
service_id:
name: service_id
in: path
Expand Down