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

additional log output: selected query parameters #304

Merged
merged 8 commits into from
Aug 31, 2023
Merged

Conversation

tyrasd
Copy link
Member

@tyrasd tyrasd commented Jul 5, 2023

Adds the following parameters to the logging output of each query:

  • filter (value <none> is used for invalid queries or queries using the deprecated types/keys/values syntax)
  • query time parameter (or <none> if empty or invalid query)
  • query boundary parameters
    • boundary type – the type of the used boundary parameter (BBOXES, BCIRCLES or BPOLYS)
    • boundary bbox – the bounding box of the respective boundary parameter used in the query
    • boundary area – the area (in km²) of the respective boundary parameter used in the query
    • (boundary: <error while processing request params> is used for invalid queries)

examples:

2023-07-05 15:24:01.878  INFO 2834322 --- [nio-8081-exec-4] org.heigit.ohsome.ohsomeapi.Application  : accessed URI: http://localhost:8081/elements/count
…  : query filter: type:node and natural=tree
…  : query time: 2014-01-01/2017-01-01/P1Y
…  : query boundary type: BCIRCLES
…  : query boundary bbox: (8.6562204,49.3810051,8.6837796,49.3989948)
…  : query boundary area: 3.12
…  : processing time: 237
…  : response code: 200

invalid query (e.g. because of missing parameter)

2023-07-05 15:26:32.568  INFO 2834322 --- [nio-8081-exec-5] org.heigit.ohsome.ohsomeapi.Application  : accessed URI: http://localhost:8081/elements/count
…  : query filter: <none>
…  : query time: <none>
…  : query boundary: <error while processing request params>
…  : processing time: 14
…  : response code: 400

//edit:

todo:

  • add to changelog

@tyrasd tyrasd added the enhancement New feature or request label Jul 5, 2023
@tyrasd tyrasd force-pushed the log-query-details branch from 09b2c47 to 3f2a978 Compare July 5, 2023 18:52
@joker234 joker234 self-requested a review August 31, 2023 15:18
joker234
joker234 previously approved these changes Aug 31, 2023
@tyrasd tyrasd merged commit b768e4b into master Aug 31, 2023
@tyrasd tyrasd deleted the log-query-details branch August 31, 2023 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants