mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
Don't try to use structured data in structured logging, it doesn't work
Our log messages were being silently dropped. Experimentation revealed that our structured logging system doesn't actually like it when we try to log structured data. See: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/540464/3/includes/ApiVisualEditorEdit.php Put it all in the message strings, whatever. Change-Id: Iae778f95774df2e24b30387221e39e097e25a4cf
This commit is contained in:
parent
df0c8ad02d
commit
04407e9eb1
|
@ -134,16 +134,13 @@ class ApiVisualEditor extends ApiBase {
|
|||
);
|
||||
} else {
|
||||
// error null, code not 200
|
||||
$trace = ( new Exception )->getTraceAsString();
|
||||
$this->logger->warning(
|
||||
__METHOD__ . ": Received HTTP {code} from RESTBase",
|
||||
[
|
||||
'code' => $response['code'],
|
||||
'trace' => ( new Exception )->getTraceAsString(),
|
||||
'response' => $response['body'],
|
||||
'requestPath' => $path,
|
||||
__METHOD__ . ": Received HTTP {$response['code']} from RESTBase for $path." .
|
||||
" Trace: {$trace}" .
|
||||
" Response: {$response['body']}" .
|
||||
/** @phan-suppress-next-line PhanTypeInvalidDimOffset */
|
||||
'requestIfMatch' => $reqheaders['If-Match'] ?? '',
|
||||
]
|
||||
" Request If-Match: {$reqheaders['If-Match']}"
|
||||
);
|
||||
$this->dieWithError(
|
||||
[ 'apierror-visualeditor-docserver-http', $response['code'] ],
|
||||
|
|
|
@ -288,11 +288,7 @@ class ApiVisualEditorEdit extends ApiVisualEditor {
|
|||
"?$
|
||||
/x', $etag ) ) {
|
||||
$this->logger->info(
|
||||
__METHOD__ . ": Received funny ETag from client: {etag}",
|
||||
[
|
||||
'etag' => $etag,
|
||||
'requestPath' => $path,
|
||||
]
|
||||
__METHOD__ . ": Received funny ETag from client: $etag for $path"
|
||||
);
|
||||
}
|
||||
return $this->requestRestbase(
|
||||
|
|
Loading…
Reference in a new issue