Admin - See OGC Request parameters if an HTTP error occurred#5004
Closed
rldhont wants to merge 1 commit into3liz:masterfrom
Closed
Admin - See OGC Request parameters if an HTTP error occurred#5004rldhont wants to merge 1 commit into3liz:masterfrom
rldhont wants to merge 1 commit into3liz:masterfrom
Conversation
5153698 to
269cd20
Compare
Gustry
reviewed
Nov 22, 2024
Contributor
Gustry
left a comment
There was a problem hiding this comment.
I'm slightly confuse if we need these two logs at this stage, in the OGCRequest class.
As we know it's a request to QGIS server, can we not always display the full request anyway and not having these two logs ? (by stripping the QGIS server URL host part)
Related to my comment, I would have a kind helper for formating a string like {REPOSITORYID} {PROJECTID} {SERVICE} {REQUEST}, it would be way quicker to debug and understand to have these parameters first displayed (if they are available), and then display all extra parameters from the map.
And also would it be displayed twice with my PR #5004 ?
Comment on lines
+196
to
+204
| // The master error with map parameter | ||
| $params = $this->parameters(); | ||
| \jLog::log('The OGC request to QGIS Server below ended with an error. Code '.$code.' → '.json_encode($params), 'error'); | ||
|
|
||
| // The admin error with map parameter replaced by repository and project parameters | ||
| unset($params['map']); | ||
| $params['repository'] = $this->project->getRepository()->getKey(); | ||
| $params['project'] = $this->project->getKey(); | ||
| \jLog::log('An HTTP request ended with an error, please check the main error log. Code '.$code.' → '.json_encode($params), 'lizmapadmin'); |
Contributor
There was a problem hiding this comment.
Suggested change
| // The master error with map parameter | |
| $params = $this->parameters(); | |
| \jLog::log('The OGC request to QGIS Server below ended with an error. Code '.$code.' → '.json_encode($params), 'error'); | |
| // The admin error with map parameter replaced by repository and project parameters | |
| unset($params['map']); | |
| $params['repository'] = $this->project->getRepository()->getKey(); | |
| $params['project'] = $this->project->getKey(); | |
| \jLog::log('An HTTP request ended with an error, please check the main error log. Code '.$code.' → '.json_encode($params), 'lizmapadmin'); | |
| $repositoryId = $this->project->getRepository()->getKey(); | |
| $projectId = $this->project->getKey(); | |
| // The master error with map parameter | |
| $params = $this->parameters(); | |
| \jLog::log('The OGC request to QGIS Server, targeting the project "'.$projectId.'" in the repository "'.$repositoryId.'", ended with an error. Code '.$code.' → '.json_encode($params), 'error'); | |
| // The admin error with map parameter replaced by repository and project parameters | |
| unset($params['map']); | |
| $params['repository'] = $repositoryId; | |
| $params['project'] = $projectId; | |
| \jLog::log('An OGC HTTP request to QGIS Server, targeting the project "'.$projectId.'" in the repository "'.$repositoryId.'", ended with an error, please check the main error log. Code '.$code.' → '.json_encode($params), 'lizmapadmin'); |
Collaborator
Author
|
superseeded by #5066 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up #4960