-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Admin - See OGC Request parameters if an HTTP error occurred #5004
base: master
Are you sure you want to change the base?
Conversation
5153698
to
269cd20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ?
// 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'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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'); |
Follow up #4960